diff options
Diffstat (limited to 'WebKit/chromium/src/InspectorClientImpl.cpp')
-rw-r--r-- | WebKit/chromium/src/InspectorClientImpl.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/WebKit/chromium/src/InspectorClientImpl.cpp b/WebKit/chromium/src/InspectorClientImpl.cpp index 22b515f..91d10d5 100644 --- a/WebKit/chromium/src/InspectorClientImpl.cpp +++ b/WebKit/chromium/src/InspectorClientImpl.cpp @@ -35,6 +35,8 @@ #include "FloatRect.h" #include "NotImplemented.h" #include "Page.h" +#include "WebDevToolsAgentImpl.h" +#include "WebDevToolsMessageData.h" #include "WebRect.h" #include "WebURL.h" #include "WebURLRequest.h" @@ -102,4 +104,20 @@ void InspectorClientImpl::storeSetting(const String& key, const String& value) m_inspectedWebView->setInspectorSetting(key, value); } +bool InspectorClientImpl::sendMessageToFrontend(const WebCore::String& message) +{ + WebDevToolsAgentImpl* devToolsAgent = static_cast<WebDevToolsAgentImpl*>(m_inspectedWebView->devToolsAgent()); + if (!devToolsAgent) + return false; + + WebVector<WebString> arguments(size_t(1)); + arguments[0] = message; + WebDevToolsMessageData data; + data.className = "ToolsAgentDelegate"; + data.methodName = "dispatchOnClient"; + data.arguments.swap(arguments); + devToolsAgent->sendRpcMessage(data); + return true; +} + } // namespace WebKit |