diff options
22 files changed, 81 insertions, 165 deletions
@@ -1,7 +1,7 @@ vars = { "webkit_trunk": "http://svn.webkit.org/repository/webkit/trunk", - "webkit_revision": "64523", + "webkit_revision": "64534", "ffmpeg_revision": "54360", "skia_revision": "592", "chromium_git": "http://src.chromium.org/git", diff --git a/chrome/browser/debugger/devtools_http_protocol_handler.cc b/chrome/browser/debugger/devtools_http_protocol_handler.cc index 8c5b0ad0..c93ee50 100644 --- a/chrome/browser/debugger/devtools_http_protocol_handler.cc +++ b/chrome/browser/debugger/devtools_http_protocol_handler.cc @@ -47,7 +47,8 @@ class DevToolsClientHostImpl : public DevToolsClientHost { virtual void SendMessageToClient(const IPC::Message& msg) { IPC_BEGIN_MESSAGE_MAP(DevToolsClientHostImpl, msg) - IPC_MESSAGE_HANDLER(DevToolsClientMsg_RpcMessage, OnRpcMessage); + IPC_MESSAGE_HANDLER(DevToolsClientMsg_DispatchOnInspectorFrontend, + OnDispatchOnInspectorFrontend); IPC_MESSAGE_UNHANDLED_ERROR() IPC_END_MESSAGE_MAP() } @@ -57,17 +58,9 @@ class DevToolsClientHostImpl : public DevToolsClientHost { } private: // Message handling routines - void OnRpcMessage(const DevToolsMessageData& data) { + void OnDispatchOnInspectorFrontend(const std::string& data) { std::string message; - message += "devtools$$dispatch(\"" + data.class_name + "\", \"" + - data.method_name + "\""; - for (std::vector<std::string>::const_iterator it = data.arguments.begin(); - it != data.arguments.end(); ++it) { - std::string param = *it; - if (!param.empty()) - message += ", " + param; - } - message += ")"; + message += "devtools$$dispatch(\"" + data + "\")"; socket_->SendOverWebSocket(message); } HttpListenSocket* socket_; @@ -251,15 +244,9 @@ void DevToolsHttpProtocolHandler::OnWebSocketMessageUI( if (it == socket_to_client_host_ui_.end()) return; - // TODO(pfeldman): Replace with proper parsing / dispatching. - DevToolsMessageData message_data; - message_data.class_name = "ToolsAgent"; - message_data.method_name = "dispatchOnInspectorController"; - message_data.arguments.push_back(data); - DevToolsManager* manager = DevToolsManager::GetInstance(); manager->ForwardToDevToolsAgent(it->second, - DevToolsAgentMsg_RpcMessage(DevToolsMessageData(message_data))); + DevToolsAgentMsg_DispatchOnInspectorBackend(data)); } void DevToolsHttpProtocolHandler::OnCloseUI(HttpListenSocket* socket) { diff --git a/chrome/browser/debugger/inspectable_tab_proxy.cc b/chrome/browser/debugger/inspectable_tab_proxy.cc index ec84066..96d4e3e 100644 --- a/chrome/browser/debugger/inspectable_tab_proxy.cc +++ b/chrome/browser/debugger/inspectable_tab_proxy.cc @@ -29,29 +29,16 @@ void DevToolsClientHostImpl::Close() { void DevToolsClientHostImpl::SendMessageToClient( const IPC::Message& msg) { + // TODO(prybin): Restore FrameNavigate. IPC_BEGIN_MESSAGE_MAP(DevToolsClientHostImpl, msg) - IPC_MESSAGE_HANDLER(DevToolsClientMsg_RpcMessage, OnRpcMessage); + IPC_MESSAGE_HANDLER(DevToolsClientMsg_DebuggerOutput, OnDebuggerOutput); IPC_MESSAGE_UNHANDLED_ERROR() IPC_END_MESSAGE_MAP() } -void DevToolsClientHostImpl::OnRpcMessage(const DevToolsMessageData& data) { - static const std::string kDebuggerAgentDelegate = "DebuggerAgentDelegate"; - static const std::string kToolsAgentDelegate = "ToolsAgentDelegate"; - static const std::string kDebuggerOutput = "debuggerOutput"; - static const std::string kFrameNavigate = "frameNavigate"; - if (data.class_name == kDebuggerAgentDelegate && - data.method_name == kDebuggerOutput) { - DebuggerOutput(data.arguments[0]); - } else if (data.class_name == kToolsAgentDelegate && - data.method_name == kFrameNavigate) { - FrameNavigate(data.arguments[0]); - } -} - -void DevToolsClientHostImpl::DebuggerOutput(const std::string& msg) { - service_->DebuggerOutput(id_, msg); +void DevToolsClientHostImpl::OnDebuggerOutput(const std::string& data) { + service_->DebuggerOutput(id_, data); } void DevToolsClientHostImpl::FrameNavigate(const std::string& url) { diff --git a/chrome/browser/debugger/inspectable_tab_proxy.h b/chrome/browser/debugger/inspectable_tab_proxy.h index d446d40..af08232 100644 --- a/chrome/browser/debugger/inspectable_tab_proxy.h +++ b/chrome/browser/debugger/inspectable_tab_proxy.h @@ -83,8 +83,7 @@ class DevToolsClientHostImpl : public DevToolsClientHost { private: // Message handling routines - void OnRpcMessage(const DevToolsMessageData& data); - void DebuggerOutput(const std::string& msg); + void OnDebuggerOutput(const std::string& msg); void FrameNavigate(const std::string& url); void TabClosed(); diff --git a/chrome/browser/extensions/extension_devtools_bridge.cc b/chrome/browser/extensions/extension_devtools_bridge.cc index d452c04..71d795b 100644 --- a/chrome/browser/extensions/extension_devtools_bridge.cc +++ b/chrome/browser/extensions/extension_devtools_bridge.cc @@ -73,22 +73,16 @@ void ExtensionDevToolsBridge::InspectedTabClosing() { void ExtensionDevToolsBridge::SendMessageToClient(const IPC::Message& msg) { IPC_BEGIN_MESSAGE_MAP(ExtensionDevToolsBridge, msg) - IPC_MESSAGE_HANDLER(DevToolsClientMsg_RpcMessage, OnRpcMessage); + IPC_MESSAGE_HANDLER(DevToolsClientMsg_DispatchToAPU, OnDispatchToAPU); IPC_MESSAGE_UNHANDLED_ERROR() IPC_END_MESSAGE_MAP() } -static const char kApuAgentClassName[] = "ApuAgentDelegate"; -static const char kApuPageEventMessageName[] = "dispatchToApu"; - -void ExtensionDevToolsBridge::OnRpcMessage(const DevToolsMessageData& data) { +void ExtensionDevToolsBridge::OnDispatchToAPU(const std::string& data) { DCHECK_EQ(MessageLoop::current()->type(), MessageLoop::TYPE_UI); - if (data.class_name == kApuAgentClassName - && data.method_name == kApuPageEventMessageName) { - std::string json = StringPrintf("[%s]", data.arguments[0].c_str()); - profile_->GetExtensionMessageService()->DispatchEventToRenderers( - on_page_event_name_, json, profile_->IsOffTheRecord(), GURL()); - } + std::string json = StringPrintf("[%s]", data.c_str()); + profile_->GetExtensionMessageService()->DispatchEventToRenderers( + on_page_event_name_, json, profile_->IsOffTheRecord(), GURL()); } diff --git a/chrome/browser/extensions/extension_devtools_bridge.h b/chrome/browser/extensions/extension_devtools_bridge.h index e84f2a1..b9b8385 100644 --- a/chrome/browser/extensions/extension_devtools_bridge.h +++ b/chrome/browser/extensions/extension_devtools_bridge.h @@ -33,7 +33,7 @@ class ExtensionDevToolsBridge : public DevToolsClientHost { virtual void SendMessageToClient(const IPC::Message& msg); private: - void OnRpcMessage(const DevToolsMessageData& data); + void OnDispatchToAPU(const std::string& data); // ID of the tab we are monitoring. int tab_id_; diff --git a/chrome/browser/extensions/extension_devtools_browsertests.cc b/chrome/browser/extensions/extension_devtools_browsertests.cc index a8e28ab..6a6f3ca 100644 --- a/chrome/browser/extensions/extension_devtools_browsertests.cc +++ b/chrome/browser/extensions/extension_devtools_browsertests.cc @@ -80,11 +80,7 @@ IN_PROC_BROWSER_TEST_F(ExtensionDevToolsBrowserTest, TimelineApi) { // Test onPageEvent event. result = false; - DevToolsMessageData message_data; - message_data.class_name = "ApuAgentDelegate"; - message_data.method_name = "dispatchToApu"; - message_data.arguments.push_back(""); - DevToolsClientMsg_RpcMessage pageEventMessage(message_data); + DevToolsClientMsg_DispatchToAPU pageEventMessage(""); devtools_client_host->SendMessageToClient(pageEventMessage); ui_test_utils::ExecuteJavaScriptAndExtractBool( host->render_view_host(), L"", L"testReceivePageEvent()", &result); diff --git a/chrome/common/devtools_messages.h b/chrome/common/devtools_messages.h index b82bb19..4a09d43 100644 --- a/chrome/common/devtools_messages.h +++ b/chrome/common/devtools_messages.h @@ -7,31 +7,6 @@ #pragma once #include "ipc/ipc_message_utils.h" -#include "webkit/glue/devtools_message_data.h" - -namespace IPC { - -// Traits for DevToolsMessageData structure to pack/unpack. -template <> -struct ParamTraits<DevToolsMessageData> { - typedef DevToolsMessageData param_type; - static void Write(Message* m, const param_type& p) { - WriteParam(m, p.class_name); - WriteParam(m, p.method_name); - WriteParam(m, p.arguments); - } - static bool Read(const Message* m, void** iter, param_type* p) { - return - ReadParam(m, iter, &p->class_name) && - ReadParam(m, iter, &p->method_name) && - ReadParam(m, iter, &p->arguments); - } - static void Log(const param_type& p, std::wstring* l) { - l->append(L"<DevToolsMessageData>"); - } -}; - -} // namespace IPC #define MESSAGES_INTERNAL_FILE "chrome/common/devtools_messages_internal.h" #include "ipc/ipc_message_macros.h" diff --git a/chrome/common/devtools_messages_internal.h b/chrome/common/devtools_messages_internal.h index dcc8eee..e3c3aee 100644 --- a/chrome/common/devtools_messages_internal.h +++ b/chrome/common/devtools_messages_internal.h @@ -43,15 +43,22 @@ // This file describes developer tools message types. #include "ipc/ipc_message_macros.h" -#include "webkit/glue/devtools_message_data.h" // These are messages sent from DevToolsAgent to DevToolsClient through the // browser. IPC_BEGIN_MESSAGES(DevToolsClient) - // Sends glue-level Rpc message to the client. - IPC_MESSAGE_CONTROL1(DevToolsClientMsg_RpcMessage, - DevToolsMessageData /* message data */) + // WebKit-level transport. + IPC_MESSAGE_CONTROL1(DevToolsClientMsg_DispatchOnInspectorFrontend, + std::string /* message */) + + // Legacy debugger output message. + IPC_MESSAGE_CONTROL1(DevToolsClientMsg_DebuggerOutput, + std::string /* message */) + + // Legacy APU dispatch message. + IPC_MESSAGE_CONTROL1(DevToolsClientMsg_DispatchToAPU, + std::string /* message */) IPC_END_MESSAGES(DevToolsClient) @@ -68,9 +75,9 @@ IPC_BEGIN_MESSAGES(DevToolsAgent) // Tells agent that there is no longer a client host connected to it. IPC_MESSAGE_CONTROL0(DevToolsAgentMsg_Detach) - // Sends glue-level Rpc message to the agent. - IPC_MESSAGE_CONTROL1(DevToolsAgentMsg_RpcMessage, - DevToolsMessageData /* message data */) + // WebKit-level transport. + IPC_MESSAGE_CONTROL1(DevToolsAgentMsg_DispatchOnInspectorBackend, + std::string /* message */) // Send debugger command to the debugger agent. Debugger commands should // be handled on IO thread(while all other devtools messages are handled in diff --git a/chrome/renderer/devtools_agent.cc b/chrome/renderer/devtools_agent.cc index 44513f5..da0f20e 100644 --- a/chrome/renderer/devtools_agent.cc +++ b/chrome/renderer/devtools_agent.cc @@ -12,7 +12,6 @@ #include "chrome/renderer/render_view.h" #include "grit/webkit_chromium_resources.h" #include "third_party/WebKit/WebKit/chromium/public/WebDevToolsAgent.h" -#include "third_party/WebKit/WebKit/chromium/public/WebDevToolsMessageData.h" #include "third_party/WebKit/WebKit/chromium/public/WebPoint.h" #include "third_party/WebKit/WebKit/chromium/public/WebString.h" #include "third_party/WebKit/WebKit/chromium/public/WebView.h" @@ -80,7 +79,8 @@ bool DevToolsAgent::OnMessageReceived(const IPC::Message& message) { IPC_BEGIN_MESSAGE_MAP(DevToolsAgent, message) IPC_MESSAGE_HANDLER(DevToolsAgentMsg_Attach, OnAttach) IPC_MESSAGE_HANDLER(DevToolsAgentMsg_Detach, OnDetach) - IPC_MESSAGE_HANDLER(DevToolsAgentMsg_RpcMessage, OnRpcMessage) + IPC_MESSAGE_HANDLER(DevToolsAgentMsg_DispatchOnInspectorBackend, + OnDispatchOnInspectorBackend) IPC_MESSAGE_HANDLER(DevToolsAgentMsg_InspectElement, OnInspectElement) IPC_MESSAGE_HANDLER(DevToolsAgentMsg_SetApuAgentEnabled, OnSetApuAgentEnabled) @@ -89,11 +89,25 @@ bool DevToolsAgent::OnMessageReceived(const IPC::Message& message) { return handled; } -void DevToolsAgent::sendMessageToFrontend( - const WebKit::WebDevToolsMessageData& data) { +void DevToolsAgent::sendMessageToInspectorFrontend( + const WebKit::WebString& message) { IPC::Message* m = new ViewHostMsg_ForwardToDevToolsClient( routing_id_, - DevToolsClientMsg_RpcMessage(DevToolsMessageData(data))); + DevToolsClientMsg_DispatchOnInspectorFrontend(message.utf8())); + render_view_->Send(m); +} + +void DevToolsAgent::sendDebuggerOutput(const WebKit::WebString& data) { + IPC::Message* m = new ViewHostMsg_ForwardToDevToolsClient( + routing_id_, + DevToolsClientMsg_DebuggerOutput(data.utf8())); + render_view_->Send(m); +} + +void DevToolsAgent::sendDispatchToAPU(const WebKit::WebString& data) { + IPC::Message* m = new ViewHostMsg_ForwardToDevToolsClient( + routing_id_, + DevToolsClientMsg_DispatchToAPU(data.utf8())); render_view_->Send(m); } @@ -169,11 +183,10 @@ void DevToolsAgent::OnDetach() { } } -void DevToolsAgent::OnRpcMessage(const DevToolsMessageData& data) { +void DevToolsAgent::OnDispatchOnInspectorBackend(const std::string& message) { WebDevToolsAgent* web_agent = GetWebAgent(); - if (web_agent) { - web_agent->dispatchMessageFromFrontend(data.ToWebDevToolsMessageData()); - } + if (web_agent) + web_agent->dispatchOnInspectorBackend(WebString::fromUTF8(message)); } void DevToolsAgent::OnInspectElement(int x, int y) { diff --git a/chrome/renderer/devtools_agent.h b/chrome/renderer/devtools_agent.h index 6163a25..1c566b0 100644 --- a/chrome/renderer/devtools_agent.h +++ b/chrome/renderer/devtools_agent.h @@ -39,8 +39,9 @@ class DevToolsAgent : public WebKit::WebDevToolsAgentClient { virtual bool OnMessageReceived(const IPC::Message& message); // WebDevToolsAgentClient implementation - virtual void sendMessageToFrontend( - const WebKit::WebDevToolsMessageData& data); + virtual void sendMessageToInspectorFrontend(const WebKit::WebString& data); + virtual void sendDebuggerOutput(const WebKit::WebString& data); + virtual void sendDispatchToAPU(const WebKit::WebString& data); virtual int hostIdentifier(); virtual void forceRepaint(); @@ -65,7 +66,7 @@ class DevToolsAgent : public WebKit::WebDevToolsAgentClient { void OnAttach(const std::vector<std::string>& runtime_features); void OnDetach(); - void OnRpcMessage(const DevToolsMessageData& data); + void OnDispatchOnInspectorBackend(const std::string& message); void OnInspectElement(int x, int y); void OnSetApuAgentEnabled(bool enabled); diff --git a/chrome/renderer/devtools_agent_filter.cc b/chrome/renderer/devtools_agent_filter.cc index 1a455f5..cd836e5 100644 --- a/chrome/renderer/devtools_agent_filter.cc +++ b/chrome/renderer/devtools_agent_filter.cc @@ -11,14 +11,9 @@ #include "chrome/renderer/plugin_channel_host.h" #include "chrome/renderer/render_view.h" #include "third_party/WebKit/WebKit/chromium/public/WebDevToolsAgent.h" -#include "third_party/WebKit/WebKit/chromium/public/WebDevToolsMessageData.h" -#include "third_party/WebKit/WebKit/chromium/public/WebDevToolsMessageTransport.h" #include "third_party/WebKit/WebKit/chromium/public/WebString.h" -#include "webkit/glue/devtools_message_data.h" using WebKit::WebDevToolsAgent; -using WebKit::WebDevToolsMessageData; -using WebKit::WebDevToolsMessageTransport; using WebKit::WebString; // static @@ -52,7 +47,6 @@ bool DevToolsAgentFilter::OnMessageReceived(const IPC::Message& message) { IPC_MESSAGE_HANDLER(DevToolsAgentMsg_DebuggerCommand, OnDebuggerCommand) IPC_MESSAGE_HANDLER(DevToolsAgentMsg_DebuggerPauseScript, OnDebuggerPauseScript) - IPC_MESSAGE_HANDLER(DevToolsAgentMsg_RpcMessage, OnRpcMessage) IPC_MESSAGE_UNHANDLED(message_handled_ = false) IPC_END_MESSAGE_MAP() return message_handled_; @@ -66,29 +60,3 @@ void DevToolsAgentFilter::OnDebuggerCommand(const std::string& command) { void DevToolsAgentFilter::OnDebuggerPauseScript() { WebDevToolsAgent::debuggerPauseScript(); } - -namespace { - -class WebDevToolsMessageTransportImpl : public WebDevToolsMessageTransport { - public: - void sendMessageToFrontendOnIOThread(const WebDevToolsMessageData& data) { - DevToolsAgentFilter::SendRpcMessage(DevToolsMessageData(data)); - } -}; - -} // namespace - -void DevToolsAgentFilter::OnRpcMessage(const DevToolsMessageData& data) { - WebDevToolsMessageTransportImpl transport; - message_handled_ = WebDevToolsAgent::dispatchMessageFromFrontendOnIOThread( - &transport, - data.ToWebDevToolsMessageData()); -} - -// static -void DevToolsAgentFilter::SendRpcMessage(const DevToolsMessageData& data) { - IPC::Message* m = new ViewHostMsg_ForwardToDevToolsClient( - current_routing_id_, - DevToolsClientMsg_RpcMessage(data)); - channel_->Send(m); -} diff --git a/chrome/renderer/devtools_agent_filter.h b/chrome/renderer/devtools_agent_filter.h index 6a80861..418be56 100644 --- a/chrome/renderer/devtools_agent_filter.h +++ b/chrome/renderer/devtools_agent_filter.h @@ -39,7 +39,6 @@ class DevToolsAgentFilter : public IPC::ChannelProxy::MessageFilter { // handle debug messages even when v8 is stopped. void OnDebuggerCommand(const std::string& command); void OnDebuggerPauseScript(); - void OnRpcMessage(const DevToolsMessageData& data); bool message_handled_; diff --git a/chrome/renderer/devtools_client.cc b/chrome/renderer/devtools_client.cc index 3620fb1..81b6f73 100644 --- a/chrome/renderer/devtools_client.cc +++ b/chrome/renderer/devtools_client.cc @@ -12,7 +12,6 @@ #include "chrome/renderer/render_thread.h" #include "chrome/renderer/render_view.h" #include "third_party/WebKit/WebKit/chromium/public/WebDevToolsFrontend.h" -#include "third_party/WebKit/WebKit/chromium/public/WebDevToolsMessageData.h" #include "third_party/WebKit/WebKit/chromium/public/WebString.h" using WebKit::WebDevToolsFrontend; @@ -42,16 +41,16 @@ bool DevToolsClient::OnMessageReceived(const IPC::Message& message) { bool handled = true; IPC_BEGIN_MESSAGE_MAP(DevToolsClient, message) - IPC_MESSAGE_HANDLER(DevToolsClientMsg_RpcMessage, OnRpcMessage) + IPC_MESSAGE_HANDLER(DevToolsClientMsg_DispatchOnInspectorFrontend, + OnDispatchOnInspectorFrontend) IPC_MESSAGE_UNHANDLED(handled = false); IPC_END_MESSAGE_MAP() return handled; } -void DevToolsClient::sendMessageToAgent( - const WebKit::WebDevToolsMessageData& data) { - Send(DevToolsAgentMsg_RpcMessage(DevToolsMessageData(data))); +void DevToolsClient::sendMessageToBackend(const WebString& message) { + Send(DevToolsAgentMsg_DispatchOnInspectorBackend(message.utf8())); } void DevToolsClient::sendDebuggerCommandToAgent(const WebString& command) { @@ -82,9 +81,10 @@ void DevToolsClient::requestUndockWindow() { render_view_->routing_id())); } -void DevToolsClient::OnRpcMessage(const DevToolsMessageData& data) { - web_tools_frontend_->dispatchMessageFromAgent( - data.ToWebDevToolsMessageData()); +void DevToolsClient::OnDispatchOnInspectorFrontend( + const std::string& message) { + web_tools_frontend_->dispatchOnInspectorFrontend( + WebString::fromUTF8(message)); } bool DevToolsClient::shouldHideScriptsPanel() { diff --git a/chrome/renderer/devtools_client.h b/chrome/renderer/devtools_client.h index d6c48c2..3625547 100644 --- a/chrome/renderer/devtools_client.h +++ b/chrome/renderer/devtools_client.h @@ -20,6 +20,7 @@ class RenderView; namespace WebKit { class WebDevToolsFrontend; +class WebString; } struct DevToolsMessageData; @@ -40,8 +41,7 @@ class DevToolsClient : public WebKit::WebDevToolsFrontendClient { bool OnMessageReceived(const IPC::Message& message); // WebDevToolsFrontendClient implementation - virtual void sendMessageToAgent( - const WebKit::WebDevToolsMessageData& data); + virtual void sendMessageToBackend(const WebKit::WebString&); virtual void sendDebuggerCommandToAgent(const WebKit::WebString& command); virtual void sendDebuggerPauseScript(); @@ -53,7 +53,7 @@ class DevToolsClient : public WebKit::WebDevToolsFrontendClient { virtual bool shouldHideScriptsPanel(); private: - void OnRpcMessage(const DevToolsMessageData& data); + void OnDispatchOnInspectorFrontend(const std::string& message); // Sends message to DevToolsAgent. void Send(const IPC::Message& tools_agent_message); diff --git a/webkit/glue/devtools_message_data.cc b/webkit/glue/devtools_message_data.cc index a9af3c5..94b7408 100644 --- a/webkit/glue/devtools_message_data.cc +++ b/webkit/glue/devtools_message_data.cc @@ -5,11 +5,9 @@ #include "webkit/glue/devtools_message_data.h" #include "third_party/WebKit/WebKit/chromium/public/WebCString.h" -#include "third_party/WebKit/WebKit/chromium/public/WebDevToolsMessageData.h" +#include "third_party/WebKit/WebKit/chromium/public/WebString.h" -using WebKit::WebDevToolsMessageData; using WebKit::WebString; -using WebKit::WebVector; DevToolsMessageData::DevToolsMessageData(const WebDevToolsMessageData& data) : class_name(data.className.utf8()), diff --git a/webkit/glue/webkit_glue.gypi b/webkit/glue/webkit_glue.gypi index f63802d..7aadc4d 100644 --- a/webkit/glue/webkit_glue.gypi +++ b/webkit/glue/webkit_glue.gypi @@ -142,8 +142,6 @@ # This list contains all .h, .cc, and .mm files in glue except for # those in the test subdirectory and those with unittest in in their # names. - 'devtools_message_data.cc', - 'devtools_message_data.h', 'media/buffered_data_source.cc', 'media/buffered_data_source.h', 'media/media_resource_loader_bridge_factory.cc', diff --git a/webkit/tools/test_shell/test_shell_devtools_agent.cc b/webkit/tools/test_shell/test_shell_devtools_agent.cc index 20e8c16..24f83d4 100644 --- a/webkit/tools/test_shell/test_shell_devtools_agent.cc +++ b/webkit/tools/test_shell/test_shell_devtools_agent.cc @@ -71,8 +71,8 @@ void TestShellDevToolsAgent::SetWebView(WebKit::WebView* web_view) { web_view_ = web_view; } -void TestShellDevToolsAgent::sendMessageToFrontend( - const WebDevToolsMessageData& data) { +void TestShellDevToolsAgent::sendMessageToInspectorFrontend( + const WebString& data) { if (dev_tools_client_) dev_tools_client_->AsyncCall(TestShellDevToolsCallArgs(data)); } @@ -119,7 +119,7 @@ void TestShellDevToolsAgent::AsyncCall(const TestShellDevToolsCallArgs &args) { void TestShellDevToolsAgent::Call(const TestShellDevToolsCallArgs &args) { WebDevToolsAgent* web_agent = GetWebAgent(); if (web_agent) - web_agent->dispatchMessageFromFrontend(args.data_); + web_agent->dispatchOnInspectorBackend(args.data_); if (TestShellDevToolsCallArgs::calls_count() == 1 && dev_tools_client_) dev_tools_client_->all_messages_processed(); } diff --git a/webkit/tools/test_shell/test_shell_devtools_agent.h b/webkit/tools/test_shell/test_shell_devtools_agent.h index baf7174..994c6b2 100644 --- a/webkit/tools/test_shell/test_shell_devtools_agent.h +++ b/webkit/tools/test_shell/test_shell_devtools_agent.h @@ -29,8 +29,8 @@ class TestShellDevToolsAgent : public WebKit::WebDevToolsAgentClient { void SetWebView(WebKit::WebView* web_view); // WebDevToolsAgentClient implementation. - virtual void sendMessageToFrontend( - const WebKit::WebDevToolsMessageData& data); + virtual void sendMessageToInspectorFrontend( + const WebKit::WebString& data); virtual int hostIdentifier() { return routing_id_; } virtual void forceRepaint(); virtual void runtimeFeatureStateChanged(const WebKit::WebString& feature, diff --git a/webkit/tools/test_shell/test_shell_devtools_callargs.h b/webkit/tools/test_shell/test_shell_devtools_callargs.h index 3fd7632..92106ec 100644 --- a/webkit/tools/test_shell/test_shell_devtools_callargs.h +++ b/webkit/tools/test_shell/test_shell_devtools_callargs.h @@ -7,19 +7,13 @@ #include "base/logging.h" -#include "third_party/WebKit/WebKit/chromium/public/WebDevToolsMessageData.h" #include "third_party/WebKit/WebKit/chromium/public/WebString.h" class TestShellDevToolsCallArgs { public: - TestShellDevToolsCallArgs(const WebKit::WebDevToolsMessageData& data) + TestShellDevToolsCallArgs(const WebKit::WebString& data) : data_(data) { ++calls_count_; - - // The same behaiviour as we have in case of IPC. - for (size_t i = 0; i < data_.arguments.size(); ++i) - if (data_.arguments[i].isNull()) - data_.arguments[i] = WebKit::WebString::fromUTF8(""); } TestShellDevToolsCallArgs(const TestShellDevToolsCallArgs& args) @@ -34,7 +28,7 @@ class TestShellDevToolsCallArgs { static int calls_count() { return calls_count_; } - WebKit::WebDevToolsMessageData data_; + WebKit::WebString data_; private: static int calls_count_; diff --git a/webkit/tools/test_shell/test_shell_devtools_client.cc b/webkit/tools/test_shell/test_shell_devtools_client.cc index f1caaf7..fe445641 100644 --- a/webkit/tools/test_shell/test_shell_devtools_client.cc +++ b/webkit/tools/test_shell/test_shell_devtools_client.cc @@ -49,8 +49,8 @@ TestShellDevToolsClient::~TestShellDevToolsClient() { dev_tools_agent_->detach(this); } -void TestShellDevToolsClient::sendMessageToAgent( - const WebDevToolsMessageData& data) { +void TestShellDevToolsClient::sendMessageToBackend( + const WebString& data) { if (dev_tools_agent_) dev_tools_agent_->AsyncCall(TestShellDevToolsCallArgs(data)); } @@ -85,7 +85,7 @@ void TestShellDevToolsClient::AsyncCall(const TestShellDevToolsCallArgs &args) { } void TestShellDevToolsClient::Call(const TestShellDevToolsCallArgs &args) { - web_tools_frontend_->dispatchMessageFromAgent(args.data_); + web_tools_frontend_->dispatchOnInspectorFrontend(args.data_); if (TestShellDevToolsCallArgs::calls_count() == 1) all_messages_processed(); } diff --git a/webkit/tools/test_shell/test_shell_devtools_client.h b/webkit/tools/test_shell/test_shell_devtools_client.h index 4663bca..d130cfd 100644 --- a/webkit/tools/test_shell/test_shell_devtools_client.h +++ b/webkit/tools/test_shell/test_shell_devtools_client.h @@ -28,7 +28,7 @@ class TestShellDevToolsClient: public WebKit::WebDevToolsFrontendClient { virtual ~TestShellDevToolsClient(); // WebDevToolsFrontendClient implementation - virtual void sendMessageToAgent(const WebKit::WebDevToolsMessageData& data); + virtual void sendMessageToBackend(const WebKit::WebString& data); virtual void sendDebuggerCommandToAgent(const WebKit::WebString& command); virtual void activateWindow(); |