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

Unified Diff: chrome/browser/devtools/devtools_ui_bindings.cc

Issue 418243003: [DevTools] Move DispatchOnDevToolsFrontend to embedder. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 6 years, 4 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 | « no previous file | content/browser/devtools/devtools_frontend_host_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/devtools/devtools_ui_bindings.cc
diff --git a/chrome/browser/devtools/devtools_ui_bindings.cc b/chrome/browser/devtools/devtools_ui_bindings.cc
index 295a9e21ccbf8510ba3a4f28764a1bbf680f0c79..227419758f6ea5246a5a3821d4c3fa4853d69eb9 100644
--- a/chrome/browser/devtools/devtools_ui_bindings.cc
+++ b/chrome/browser/devtools/devtools_ui_bindings.cc
@@ -412,8 +412,9 @@ void DevToolsUIBindings::HandleMessageFromDevToolsFrontendToBackend(
// content::DevToolsClientHost implementation ---------------------------------
void DevToolsUIBindings::DispatchOnInspectorFrontend(
const std::string& message) {
- if (frontend_host_)
- frontend_host_->DispatchOnDevToolsFrontend(message);
+ base::StringValue message_value(message);
+ CallClientFunction("InspectorFrontendAPI.dispatchMessage",
+ &message_value, NULL, NULL);
}
void DevToolsUIBindings::InspectedContentsClosing() {
@@ -804,8 +805,9 @@ void DevToolsUIBindings::CallClientFunction(const std::string& function_name,
}
}
}
- base::string16 javascript =
- base::UTF8ToUTF16(function_name + "(" + params + ");");
+
+ base::string16 javascript = base::UTF8ToUTF16(
+ function_name + "(" + params + ");");
web_contents_->GetMainFrame()->ExecuteJavaScript(javascript);
}
« no previous file with comments | « no previous file | content/browser/devtools/devtools_frontend_host_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698