| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 } |
| OLD | NEW |