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

Unified Diff: content/renderer/devtools/devtools_client.cc

Issue 1144393004: [DevTools] Load DevTools frontend without iframe (chromium part). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@remove-test
Patch Set: Addressed review comments Created 5 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
Index: content/renderer/devtools/devtools_client.cc
diff --git a/content/renderer/devtools/devtools_client.cc b/content/renderer/devtools/devtools_client.cc
index 39bd12a60f4dd1eb855f2a83c9deb799b6e3382d..92dcc177345ab5edfde0a788460bc32eb34e324d 100644
--- a/content/renderer/devtools/devtools_client.cc
+++ b/content/renderer/devtools/devtools_client.cc
@@ -22,8 +22,11 @@ using blink::WebString;
namespace content {
-DevToolsClient::DevToolsClient(RenderFrame* main_render_frame)
- : RenderFrameObserver(main_render_frame) {
+DevToolsClient::DevToolsClient(
+ RenderFrame* main_render_frame,
+ const std::string& compatibility_script)
+ : RenderFrameObserver(main_render_frame),
+ compatibility_script_(compatibility_script) {
const base::CommandLine& command_line =
*base::CommandLine::ForCurrentProcess();
web_tools_frontend_.reset(WebDevToolsFrontend::create(
@@ -34,6 +37,11 @@ DevToolsClient::DevToolsClient(RenderFrame* main_render_frame)
DevToolsClient::~DevToolsClient() {
}
+void DevToolsClient::DidClearWindowObject() {
+ if (!compatibility_script_.empty())
+ render_frame()->ExecuteJavaScript(base::UTF8ToUTF16(compatibility_script_));
+}
+
void DevToolsClient::sendMessageToBackend(const WebString& message) {
Send(new DevToolsAgentMsg_DispatchOnInspectorBackend(routing_id(),
message.utf8()));
« no previous file with comments | « content/renderer/devtools/devtools_client.h ('k') | content/shell/browser/layout_test/layout_test_devtools_frontend.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698