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

Side by Side Diff: chrome/renderer/devtools_client.cc

Issue 3020063: DevTools: get rid of delayed command dispatching on front-end side. (Closed)
Patch Set: Created 10 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
« no previous file with comments | « chrome/renderer/devtools_client.h ('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 (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 "chrome/renderer/devtools_client.h" 5 #include "chrome/renderer/devtools_client.h"
6 6
7 #include "app/app_switches.h" 7 #include "app/app_switches.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "chrome/common/chrome_switches.h" 9 #include "chrome/common/chrome_switches.h"
10 #include "chrome/common/devtools_messages.h" 10 #include "chrome/common/devtools_messages.h"
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 bool handled = true; 42 bool handled = true;
43 IPC_BEGIN_MESSAGE_MAP(DevToolsClient, message) 43 IPC_BEGIN_MESSAGE_MAP(DevToolsClient, message)
44 IPC_MESSAGE_HANDLER(DevToolsClientMsg_DispatchOnInspectorFrontend, 44 IPC_MESSAGE_HANDLER(DevToolsClientMsg_DispatchOnInspectorFrontend,
45 OnDispatchOnInspectorFrontend) 45 OnDispatchOnInspectorFrontend)
46 IPC_MESSAGE_UNHANDLED(handled = false); 46 IPC_MESSAGE_UNHANDLED(handled = false);
47 IPC_END_MESSAGE_MAP() 47 IPC_END_MESSAGE_MAP()
48 48
49 return handled; 49 return handled;
50 } 50 }
51 51
52 void DevToolsClient::sendFrontendLoaded() {
53 Send(DevToolsAgentMsg_FrontendLoaded());
54 }
55
52 void DevToolsClient::sendMessageToBackend(const WebString& message) { 56 void DevToolsClient::sendMessageToBackend(const WebString& message) {
53 Send(DevToolsAgentMsg_DispatchOnInspectorBackend(message.utf8())); 57 Send(DevToolsAgentMsg_DispatchOnInspectorBackend(message.utf8()));
54 } 58 }
55 59
56 void DevToolsClient::sendDebuggerCommandToAgent(const WebString& command) { 60 void DevToolsClient::sendDebuggerCommandToAgent(const WebString& command) {
57 Send(DevToolsAgentMsg_DebuggerCommand(command.utf8())); 61 Send(DevToolsAgentMsg_DebuggerCommand(command.utf8()));
58 } 62 }
59 63
60 void DevToolsClient::sendDebuggerPauseScript() { 64 void DevToolsClient::sendDebuggerPauseScript() {
61 Send(DevToolsAgentMsg_DebuggerPauseScript()); 65 Send(DevToolsAgentMsg_DebuggerPauseScript());
(...skipping 22 matching lines...) Expand all
84 void DevToolsClient::OnDispatchOnInspectorFrontend( 88 void DevToolsClient::OnDispatchOnInspectorFrontend(
85 const std::string& message) { 89 const std::string& message) {
86 web_tools_frontend_->dispatchOnInspectorFrontend( 90 web_tools_frontend_->dispatchOnInspectorFrontend(
87 WebString::fromUTF8(message)); 91 WebString::fromUTF8(message));
88 } 92 }
89 93
90 bool DevToolsClient::shouldHideScriptsPanel() { 94 bool DevToolsClient::shouldHideScriptsPanel() {
91 CommandLine* cmd = CommandLine::ForCurrentProcess(); 95 CommandLine* cmd = CommandLine::ForCurrentProcess();
92 return cmd->HasSwitch(switches::kRemoteShellPort); 96 return cmd->HasSwitch(switches::kRemoteShellPort);
93 } 97 }
OLDNEW
« no previous file with comments | « chrome/renderer/devtools_client.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698