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

Side by Side Diff: content/browser/web_contents/web_contents_impl.cc

Issue 577923002: [DevTools] Implement DevToolsManager::Observer which notifies about target updates. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@move-enumerate-to-dtm-delegate
Patch Set: rebased Created 6 years, 3 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
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/browser/web_contents/web_contents_impl.h" 5 #include "content/browser/web_contents/web_contents_impl.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/debug/trace_event.h" 10 #include "base/debug/trace_event.h"
11 #include "base/lazy_instance.h" 11 #include "base/lazy_instance.h"
12 #include "base/logging.h" 12 #include "base/logging.h"
13 #include "base/metrics/histogram.h" 13 #include "base/metrics/histogram.h"
14 #include "base/metrics/stats_counters.h" 14 #include "base/metrics/stats_counters.h"
15 #include "base/process/process.h" 15 #include "base/process/process.h"
16 #include "base/strings/string16.h" 16 #include "base/strings/string16.h"
17 #include "base/strings/string_number_conversions.h" 17 #include "base/strings/string_number_conversions.h"
18 #include "base/strings/string_util.h" 18 #include "base/strings/string_util.h"
19 #include "base/strings/utf_string_conversions.h" 19 #include "base/strings/utf_string_conversions.h"
20 #include "base/time/time.h" 20 #include "base/time/time.h"
21 #include "content/browser/accessibility/accessibility_mode_helper.h" 21 #include "content/browser/accessibility/accessibility_mode_helper.h"
22 #include "content/browser/accessibility/browser_accessibility_state_impl.h" 22 #include "content/browser/accessibility/browser_accessibility_state_impl.h"
23 #include "content/browser/browser_plugin/browser_plugin_embedder.h" 23 #include "content/browser/browser_plugin/browser_plugin_embedder.h"
24 #include "content/browser/browser_plugin/browser_plugin_guest.h" 24 #include "content/browser/browser_plugin/browser_plugin_guest.h"
25 #include "content/browser/child_process_security_policy_impl.h" 25 #include "content/browser/child_process_security_policy_impl.h"
26 #include "content/browser/devtools/render_view_devtools_agent_host.h" 26 #include "content/browser/devtools/devtools_manager.h"
27 #include "content/browser/dom_storage/dom_storage_context_wrapper.h" 27 #include "content/browser/dom_storage/dom_storage_context_wrapper.h"
28 #include "content/browser/dom_storage/session_storage_namespace_impl.h" 28 #include "content/browser/dom_storage/session_storage_namespace_impl.h"
29 #include "content/browser/download/download_stats.h" 29 #include "content/browser/download/download_stats.h"
30 #include "content/browser/download/mhtml_generation_manager.h" 30 #include "content/browser/download/mhtml_generation_manager.h"
31 #include "content/browser/download/save_package.h" 31 #include "content/browser/download/save_package.h"
32 #include "content/browser/frame_host/cross_process_frame_connector.h" 32 #include "content/browser/frame_host/cross_process_frame_connector.h"
33 #include "content/browser/frame_host/interstitial_page_impl.h" 33 #include "content/browser/frame_host/interstitial_page_impl.h"
34 #include "content/browser/frame_host/navigation_entry_impl.h" 34 #include "content/browser/frame_host/navigation_entry_impl.h"
35 #include "content/browser/frame_host/navigator_impl.h" 35 #include "content/browser/frame_host/navigator_impl.h"
36 #include "content/browser/frame_host/render_frame_host_impl.h" 36 #include "content/browser/frame_host/render_frame_host_impl.h"
(...skipping 3509 matching lines...) Expand 10 before | Expand all | Expand 10 after
3546 FOR_EACH_OBSERVER( 3546 FOR_EACH_OBSERVER(
3547 WebContentsObserver, observers_, RenderViewCreated(render_view_host)); 3547 WebContentsObserver, observers_, RenderViewCreated(render_view_host));
3548 3548
3549 // We tell the observers now instead of when the main RenderFrameHostImpl is 3549 // We tell the observers now instead of when the main RenderFrameHostImpl is
3550 // constructed because otherwise it would be too early (i.e. IPCs sent to the 3550 // constructed because otherwise it would be too early (i.e. IPCs sent to the
3551 // frame would be dropped because it's not created yet). 3551 // frame would be dropped because it's not created yet).
3552 RenderFrameHost* main_frame = render_view_host->GetMainFrame(); 3552 RenderFrameHost* main_frame = render_view_host->GetMainFrame();
3553 FOR_EACH_OBSERVER( 3553 FOR_EACH_OBSERVER(
3554 WebContentsObserver, observers_, RenderFrameCreated(main_frame)); 3554 WebContentsObserver, observers_, RenderFrameCreated(main_frame));
3555 SetAccessibilityModeOnFrame(accessibility_mode_, main_frame); 3555 SetAccessibilityModeOnFrame(accessibility_mode_, main_frame);
3556
3557 DevToolsManager::GetInstance()->RenderViewCreated(this, render_view_host);
3556 } 3558 }
3557 3559
3558 void WebContentsImpl::RenderViewReady(RenderViewHost* rvh) { 3560 void WebContentsImpl::RenderViewReady(RenderViewHost* rvh) {
3559 if (rvh != GetRenderViewHost()) { 3561 if (rvh != GetRenderViewHost()) {
3560 // Don't notify the world, since this came from a renderer in the 3562 // Don't notify the world, since this came from a renderer in the
3561 // background. 3563 // background.
3562 return; 3564 return;
3563 } 3565 }
3564 3566
3565 notify_disconnection_ = true; 3567 notify_disconnection_ = true;
(...skipping 800 matching lines...) Expand 10 before | Expand all | Expand 10 after
4366 node->render_manager()->ResumeResponseDeferredAtStart(); 4368 node->render_manager()->ResumeResponseDeferredAtStart();
4367 } 4369 }
4368 4370
4369 void WebContentsImpl::SetForceDisableOverscrollContent(bool force_disable) { 4371 void WebContentsImpl::SetForceDisableOverscrollContent(bool force_disable) {
4370 force_disable_overscroll_content_ = force_disable; 4372 force_disable_overscroll_content_ = force_disable;
4371 if (view_) 4373 if (view_)
4372 view_->SetOverscrollControllerEnabled(CanOverscrollContent()); 4374 view_->SetOverscrollControllerEnabled(CanOverscrollContent());
4373 } 4375 }
4374 4376
4375 } // namespace content 4377 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698