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

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: fixed test flakiness Created 6 years, 2 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/browser/devtools/render_view_devtools_agent_host.cc ('k') | no next file » | 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/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 3515 matching lines...) Expand 10 before | Expand all | Expand 10 after
3552 FOR_EACH_OBSERVER( 3552 FOR_EACH_OBSERVER(
3553 WebContentsObserver, observers_, RenderViewCreated(render_view_host)); 3553 WebContentsObserver, observers_, RenderViewCreated(render_view_host));
3554 3554
3555 // We tell the observers now instead of when the main RenderFrameHostImpl is 3555 // We tell the observers now instead of when the main RenderFrameHostImpl is
3556 // constructed because otherwise it would be too early (i.e. IPCs sent to the 3556 // constructed because otherwise it would be too early (i.e. IPCs sent to the
3557 // frame would be dropped because it's not created yet). 3557 // frame would be dropped because it's not created yet).
3558 RenderFrameHost* main_frame = render_view_host->GetMainFrame(); 3558 RenderFrameHost* main_frame = render_view_host->GetMainFrame();
3559 FOR_EACH_OBSERVER( 3559 FOR_EACH_OBSERVER(
3560 WebContentsObserver, observers_, RenderFrameCreated(main_frame)); 3560 WebContentsObserver, observers_, RenderFrameCreated(main_frame));
3561 SetAccessibilityModeOnFrame(accessibility_mode_, main_frame); 3561 SetAccessibilityModeOnFrame(accessibility_mode_, main_frame);
3562
3563 DevToolsManager::GetInstance()->RenderViewCreated(this, render_view_host);
3562 } 3564 }
3563 3565
3564 void WebContentsImpl::RenderViewReady(RenderViewHost* rvh) { 3566 void WebContentsImpl::RenderViewReady(RenderViewHost* rvh) {
3565 if (rvh != GetRenderViewHost()) { 3567 if (rvh != GetRenderViewHost()) {
3566 // Don't notify the world, since this came from a renderer in the 3568 // Don't notify the world, since this came from a renderer in the
3567 // background. 3569 // background.
3568 return; 3570 return;
3569 } 3571 }
3570 3572
3571 notify_disconnection_ = true; 3573 notify_disconnection_ = true;
(...skipping 800 matching lines...) Expand 10 before | Expand all | Expand 10 after
4372 node->render_manager()->ResumeResponseDeferredAtStart(); 4374 node->render_manager()->ResumeResponseDeferredAtStart();
4373 } 4375 }
4374 4376
4375 void WebContentsImpl::SetForceDisableOverscrollContent(bool force_disable) { 4377 void WebContentsImpl::SetForceDisableOverscrollContent(bool force_disable) {
4376 force_disable_overscroll_content_ = force_disable; 4378 force_disable_overscroll_content_ = force_disable;
4377 if (view_) 4379 if (view_)
4378 view_->SetOverscrollControllerEnabled(CanOverscrollContent()); 4380 view_->SetOverscrollControllerEnabled(CanOverscrollContent());
4379 } 4381 }
4380 4382
4381 } // namespace content 4383 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/devtools/render_view_devtools_agent_host.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698