OLD | NEW |
---|---|
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/debug/trace_event.h" | 9 #include "base/debug/trace_event.h" |
10 #include "base/lazy_instance.h" | 10 #include "base/lazy_instance.h" |
(...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
344 case CONSOLE_MESSAGE_LEVEL_ERROR: | 344 case CONSOLE_MESSAGE_LEVEL_ERROR: |
345 target_level = WebConsoleMessage::LevelError; | 345 target_level = WebConsoleMessage::LevelError; |
346 break; | 346 break; |
347 } | 347 } |
348 main_frame->addMessageToConsole( | 348 main_frame->addMessageToConsole( |
349 WebConsoleMessage(target_level, WebString::fromUTF8(message))); | 349 WebConsoleMessage(target_level, WebString::fromUTF8(message))); |
350 } | 350 } |
351 | 351 |
352 void DevToolsAgent::ContinueProgram() { | 352 void DevToolsAgent::ContinueProgram() { |
353 WebDevToolsAgent* web_agent = GetWebAgent(); | 353 WebDevToolsAgent* web_agent = GetWebAgent(); |
354 // TODO(pfeldman): rename didNavigate to continueProgram upstream. | |
355 // That is in fact the purpose of the signal. | 354 // That is in fact the purpose of the signal. |
yurys
2014/06/16 07:22:18
Please remove remaining part of the comment too.
| |
356 if (web_agent) | 355 if (web_agent) |
357 web_agent->didNavigate(); | 356 web_agent->continueProgram(); |
358 } | 357 } |
359 | 358 |
360 void DevToolsAgent::OnSetupDevToolsClient() { | 359 void DevToolsAgent::OnSetupDevToolsClient() { |
361 // We only want to register once per render view. | 360 // We only want to register once per render view. |
362 if (is_devtools_client_) | 361 if (is_devtools_client_) |
363 return; | 362 return; |
364 is_devtools_client_ = true; | 363 is_devtools_client_ = true; |
365 new DevToolsClient(static_cast<RenderViewImpl*>(render_view())); | 364 new DevToolsClient(static_cast<RenderViewImpl*>(render_view())); |
366 } | 365 } |
367 | 366 |
368 WebDevToolsAgent* DevToolsAgent::GetWebAgent() { | 367 WebDevToolsAgent* DevToolsAgent::GetWebAgent() { |
369 WebView* web_view = render_view()->GetWebView(); | 368 WebView* web_view = render_view()->GetWebView(); |
370 if (!web_view) | 369 if (!web_view) |
371 return NULL; | 370 return NULL; |
372 return web_view->devToolsAgent(); | 371 return web_view->devToolsAgent(); |
373 } | 372 } |
374 | 373 |
375 bool DevToolsAgent::IsAttached() { | 374 bool DevToolsAgent::IsAttached() { |
376 return is_attached_; | 375 return is_attached_; |
377 } | 376 } |
378 | 377 |
379 } // namespace content | 378 } // namespace content |
OLD | NEW |