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

Unified Diff: chrome/browser/debugger/inspectable_tab_proxy.cc

Issue 115862: DevTools: pass class and method name as arguments to RPC messages (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 7 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/browser/debugger/inspectable_tab_proxy.h ('k') | chrome/common/devtools_messages_internal.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/debugger/inspectable_tab_proxy.cc
===================================================================
--- chrome/browser/debugger/inspectable_tab_proxy.cc (revision 17071)
+++ chrome/browser/debugger/inspectable_tab_proxy.cc (working copy)
@@ -36,7 +36,9 @@
IPC_END_MESSAGE_MAP()
}
-void DevToolsClientHostImpl::OnRpcMessage(const std::string& msg) {
+void DevToolsClientHostImpl::OnRpcMessage(const std::string& class_name,
+ const std::string& message_name,
+ const std::string& msg) {
static const std::string kDebuggerAgentDelegate = "DebuggerAgentDelegate";
static const std::string kToolsAgentDelegate = "ToolsAgentDelegate";
static const std::string kDebuggerOutput = "DebuggerOutput";
@@ -48,18 +50,14 @@
return;
}
ListValue* list_msg = static_cast<ListValue*>(message.get());
- std::string class_name;
- list_msg->GetString(0, &class_name);
- std::string message_name;
- list_msg->GetString(1, &message_name);
if (class_name == kDebuggerAgentDelegate && message_name == kDebuggerOutput) {
std::string str;
- list_msg->GetString(2, &str);
+ list_msg->GetString(0, &str);
DebuggerOutput(str);
} else if (class_name == kToolsAgentDelegate &&
message_name == kFrameNavigate) {
std::string url;
- list_msg->GetString(2, &url);
+ list_msg->GetString(0, &url);
FrameNavigate(url);
}
}
« no previous file with comments | « chrome/browser/debugger/inspectable_tab_proxy.h ('k') | chrome/common/devtools_messages_internal.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698