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

Side by Side Diff: content/renderer/devtools_agent.cc

Issue 8549022: Define DevTools content API (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed pfeldman's comments Created 9 years 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
OLDNEW
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
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
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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698