OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/renderer/devtools_agent.h" | 5 #include "content/renderer/devtools_agent.h" |
6 | 6 |
7 #include <map> | 7 #include <map> |
8 | 8 |
9 #include "base/lazy_instance.h" | 9 #include "base/lazy_instance.h" |
10 #include "base/message_loop.h" | 10 #include "base/message_loop.h" |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
85 IPC_END_MESSAGE_MAP() | 85 IPC_END_MESSAGE_MAP() |
86 | 86 |
87 if (message.type() == ViewMsg_Navigate::ID) | 87 if (message.type() == ViewMsg_Navigate::ID) |
88 OnNavigate(); // Don't want to swallow the message. | 88 OnNavigate(); // Don't want to swallow the message. |
89 | 89 |
90 return handled; | 90 return handled; |
91 } | 91 } |
92 | 92 |
93 void DevToolsAgent::sendMessageToInspectorFrontend( | 93 void DevToolsAgent::sendMessageToInspectorFrontend( |
94 const WebKit::WebString& message) { | 94 const WebKit::WebString& message) { |
95 Send(new DevToolsHostMsg_ForwardToClient( | 95 Send(new DevToolsClientMsg_DispatchOnInspectorFrontend(routing_id(), |
96 routing_id(), | 96 message.utf8())); |
97 DevToolsClientMsg_DispatchOnInspectorFrontend(MSG_ROUTING_NONE, | |
98 message.utf8()))); | |
99 } | 97 } |
100 | 98 |
101 int DevToolsAgent::hostIdentifier() { | 99 int DevToolsAgent::hostIdentifier() { |
102 return routing_id(); | 100 return routing_id(); |
103 } | 101 } |
104 | 102 |
105 void DevToolsAgent::saveAgentRuntimeState( | 103 void DevToolsAgent::saveAgentRuntimeState( |
106 const WebKit::WebString& state) { | 104 const WebKit::WebString& state) { |
107 Send(new DevToolsHostMsg_SaveAgentRuntimeState(routing_id(), state.utf8())); | 105 Send(new DevToolsHostMsg_SaveAgentRuntimeState(routing_id(), state.utf8())); |
108 } | 106 } |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
181 WebDevToolsAgent* DevToolsAgent::GetWebAgent() { | 179 WebDevToolsAgent* DevToolsAgent::GetWebAgent() { |
182 WebView* web_view = render_view()->GetWebView(); | 180 WebView* web_view = render_view()->GetWebView(); |
183 if (!web_view) | 181 if (!web_view) |
184 return NULL; | 182 return NULL; |
185 return web_view->devToolsAgent(); | 183 return web_view->devToolsAgent(); |
186 } | 184 } |
187 | 185 |
188 bool DevToolsAgent::IsAttached() { | 186 bool DevToolsAgent::IsAttached() { |
189 return is_attached_; | 187 return is_attached_; |
190 } | 188 } |
OLD | NEW |