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

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

Issue 1144393004: [DevTools] Load DevTools frontend without iframe (chromium part). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@remove-test
Patch Set: Addressed review comments Created 5 years, 6 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 | « content/renderer/devtools/devtools_agent.h ('k') | content/renderer/devtools/devtools_client.h » ('j') | 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/devtools_agent.h" 5 #include "content/renderer/devtools/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/message_loop.h" 10 #include "base/message_loop/message_loop.h"
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after
254 web_frame->addMessageToConsole( 254 web_frame->addMessageToConsole(
255 WebConsoleMessage(target_level, WebString::fromUTF8(message))); 255 WebConsoleMessage(target_level, WebString::fromUTF8(message)));
256 } 256 }
257 257
258 void DevToolsAgent::ContinueProgram() { 258 void DevToolsAgent::ContinueProgram() {
259 WebDevToolsAgent* web_agent = GetWebAgent(); 259 WebDevToolsAgent* web_agent = GetWebAgent();
260 if (web_agent) 260 if (web_agent)
261 web_agent->continueProgram(); 261 web_agent->continueProgram();
262 } 262 }
263 263
264 void DevToolsAgent::OnSetupDevToolsClient() { 264 void DevToolsAgent::OnSetupDevToolsClient(
265 const std::string& compatibility_script) {
265 // We only want to register once; and only in main frame. 266 // We only want to register once; and only in main frame.
266 DCHECK(!frame_->GetWebFrame() || !frame_->GetWebFrame()->parent()); 267 DCHECK(!frame_->GetWebFrame() || !frame_->GetWebFrame()->parent());
267 if (is_devtools_client_) 268 if (is_devtools_client_)
268 return; 269 return;
269 is_devtools_client_ = true; 270 is_devtools_client_ = true;
270 new DevToolsClient(frame_); 271 new DevToolsClient(frame_, compatibility_script);
271 } 272 }
272 273
273 WebDevToolsAgent* DevToolsAgent::GetWebAgent() { 274 WebDevToolsAgent* DevToolsAgent::GetWebAgent() {
274 WebLocalFrame* web_frame = frame_->GetWebFrame(); 275 WebLocalFrame* web_frame = frame_->GetWebFrame();
275 return web_frame ? web_frame->devToolsAgent() : nullptr; 276 return web_frame ? web_frame->devToolsAgent() : nullptr;
276 } 277 }
277 278
278 bool DevToolsAgent::IsAttached() { 279 bool DevToolsAgent::IsAttached() {
279 return is_attached_; 280 return is_attached_;
280 } 281 }
281 282
282 } // namespace content 283 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/devtools/devtools_agent.h ('k') | content/renderer/devtools/devtools_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698