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

Unified Diff: chrome/browser/debugger/devtools_http_protocol_handler.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 | « DEPS ('k') | chrome/browser/debugger/inspectable_tab_proxy.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/debugger/devtools_http_protocol_handler.cc
diff --git a/chrome/browser/debugger/devtools_http_protocol_handler.cc b/chrome/browser/debugger/devtools_http_protocol_handler.cc
index 8c5b0ad0399a9a672cc0e0bd18eef3bfdf308f98..c93ee50b8d20219a011fe915e9cddb7b4438c1b5 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) {
« no previous file with comments | « DEPS ('k') | chrome/browser/debugger/inspectable_tab_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698