Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2984)

Unified Diff: chrome/renderer/devtools_agent.cc

Issue 3005044: DevTools: Get rid of DevTools RPC. (Closed)
Patch Set: More files removed Created 10 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/renderer/devtools_agent.h ('k') | chrome/renderer/devtools_agent_filter.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/devtools_agent.cc
diff --git a/chrome/renderer/devtools_agent.cc b/chrome/renderer/devtools_agent.cc
index 44513f5f1d51b9921ab23d2d5d82c3e77cc40619..da0f20ec4a58baaaac55d1f219e9e4f4caf8a094 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) {
« no previous file with comments | « chrome/renderer/devtools_agent.h ('k') | chrome/renderer/devtools_agent_filter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698