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

Side by Side Diff: content/shell/browser/shell_devtools_frontend.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 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/json/json_reader.h" 8 #include "base/json/json_reader.h"
9 #include "base/path_service.h" 9 #include "base/path_service.h"
10 #include "base/strings/string_number_conversions.h" 10 #include "base/strings/string_number_conversions.h"
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 } 172 }
173 173
174 void ShellDevToolsFrontend::HandleMessageFromDevToolsFrontendToBackend( 174 void ShellDevToolsFrontend::HandleMessageFromDevToolsFrontendToBackend(
175 const std::string& message) { 175 const std::string& message) {
176 DevToolsManager::GetInstance()->DispatchOnInspectorBackend( 176 DevToolsManager::GetInstance()->DispatchOnInspectorBackend(
177 this, message); 177 this, message);
178 } 178 }
179 179
180 void ShellDevToolsFrontend::DispatchOnInspectorFrontend( 180 void ShellDevToolsFrontend::DispatchOnInspectorFrontend(
181 const std::string& message) { 181 const std::string& message) {
182 if (frontend_host_) 182 std::string code = "InspectorFrontendAPI.dispatchMessage(" + message + ");";
183 frontend_host_->DispatchOnDevToolsFrontend(message); 183 base::string16 javascript = base::UTF8ToUTF16(code);
184 web_contents()->GetMainFrame()->ExecuteJavaScript(javascript);
184 } 185 }
185 186
186 void ShellDevToolsFrontend::InspectedContentsClosing() { 187 void ShellDevToolsFrontend::InspectedContentsClosing() {
187 frontend_shell_->Close(); 188 frontend_shell_->Close();
188 } 189 }
189 190
190 } // namespace content 191 } // 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