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

Side by Side Diff: content/shell/browser/shell_devtools_frontend.cc

Issue 444633003: Revert of [DevTools] Move DispatchOnDevToolsFrontend to embedder. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « content/renderer/devtools/devtools_client.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/shell/browser/shell_devtools_frontend.h" 5 #include "content/shell/browser/shell_devtools_frontend.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/path_service.h" 8 #include "base/path_service.h"
9 #include "base/strings/stringprintf.h" 9 #include "base/strings/stringprintf.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 } 136 }
137 137
138 void ShellDevToolsFrontend::HandleMessageFromDevToolsFrontendToBackend( 138 void ShellDevToolsFrontend::HandleMessageFromDevToolsFrontendToBackend(
139 const std::string& message) { 139 const std::string& message) {
140 DevToolsManager::GetInstance()->DispatchOnInspectorBackend( 140 DevToolsManager::GetInstance()->DispatchOnInspectorBackend(
141 this, message); 141 this, message);
142 } 142 }
143 143
144 void ShellDevToolsFrontend::DispatchOnInspectorFrontend( 144 void ShellDevToolsFrontend::DispatchOnInspectorFrontend(
145 const std::string& message) { 145 const std::string& message) {
146 std::string code = "InspectorFrontendAPI.dispatchMessage(" + message + ");"; 146 if (frontend_host_)
147 base::string16 javascript = base::UTF8ToUTF16(code); 147 frontend_host_->DispatchOnDevToolsFrontend(message);
148 web_contents()->GetMainFrame()->ExecuteJavaScript(javascript);
149 } 148 }
150 149
151 void ShellDevToolsFrontend::InspectedContentsClosing() { 150 void ShellDevToolsFrontend::InspectedContentsClosing() {
152 frontend_shell_->Close(); 151 frontend_shell_->Close();
153 } 152 }
154 153
155 } // namespace content 154 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/devtools/devtools_client.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698