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

Side by Side Diff: chrome/browser/ui/tab_helpers.cc

Issue 1312213010: PageLoadMetrics renderer and browser implementation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Relax DCHECK constraints slightly for tests Created 5 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "chrome/browser/ui/tab_helpers.h" 5 #include "chrome/browser/ui/tab_helpers.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "chrome/browser/browser_process.h" 8 #include "chrome/browser/browser_process.h"
9 #include "chrome/browser/content_settings/chrome_content_settings_client.h" 9 #include "chrome/browser/content_settings/chrome_content_settings_client.h"
10 #include "chrome/browser/content_settings/tab_specific_content_settings.h" 10 #include "chrome/browser/content_settings/tab_specific_content_settings.h"
(...skipping 27 matching lines...) Expand all
38 #include "chrome/browser/ui/search/search_tab_helper.h" 38 #include "chrome/browser/ui/search/search_tab_helper.h"
39 #include "chrome/browser/ui/tab_contents/core_tab_helper.h" 39 #include "chrome/browser/ui/tab_contents/core_tab_helper.h"
40 #include "chrome/browser/ui/tab_dialogs.h" 40 #include "chrome/browser/ui/tab_dialogs.h"
41 #include "chrome/common/chrome_switches.h" 41 #include "chrome/common/chrome_switches.h"
42 #include "components/autofill/content/browser/content_autofill_driver_factory.h" 42 #include "components/autofill/content/browser/content_autofill_driver_factory.h"
43 #include "components/autofill/core/browser/autofill_manager.h" 43 #include "components/autofill/core/browser/autofill_manager.h"
44 #include "components/dom_distiller/content/browser/web_contents_main_frame_obser ver.h" 44 #include "components/dom_distiller/content/browser/web_contents_main_frame_obser ver.h"
45 #include "components/dom_distiller/core/dom_distiller_switches.h" 45 #include "components/dom_distiller/core/dom_distiller_switches.h"
46 #include "components/history/content/browser/web_contents_top_sites_observer.h" 46 #include "components/history/content/browser/web_contents_top_sites_observer.h"
47 #include "components/history/core/browser/top_sites.h" 47 #include "components/history/core/browser/top_sites.h"
48 #include "components/page_load_metrics/browser/metrics_web_contents_observer.h"
48 #include "components/password_manager/core/browser/password_manager.h" 49 #include "components/password_manager/core/browser/password_manager.h"
49 #include "components/sessions/content/content_live_tab.h" 50 #include "components/sessions/content/content_live_tab.h"
50 #include "components/tracing/tracing_switches.h" 51 #include "components/tracing/tracing_switches.h"
51 #include "content/public/browser/web_contents.h" 52 #include "content/public/browser/web_contents.h"
52 53
53 #if defined(OS_ANDROID) 54 #if defined(OS_ANDROID)
54 #include "chrome/browser/android/voice_search_tab_helper.h" 55 #include "chrome/browser/android/voice_search_tab_helper.h"
55 #include "chrome/browser/android/webapps/single_tab_mode_tab_helper.h" 56 #include "chrome/browser/android/webapps/single_tab_mode_tab_helper.h"
56 #include "chrome/browser/ui/android/context_menu_helper.h" 57 #include "chrome/browser/ui/android/context_menu_helper.h"
57 #include "chrome/browser/ui/android/window_android_helper.h" 58 #include "chrome/browser/ui/android/window_android_helper.h"
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 history::WebContentsTopSitesObserver::CreateForWebContents( 159 history::WebContentsTopSitesObserver::CreateForWebContents(
159 web_contents, TopSitesFactory::GetForProfile( 160 web_contents, TopSitesFactory::GetForProfile(
160 Profile::FromBrowserContext( 161 Profile::FromBrowserContext(
161 web_contents->GetBrowserContext())).get()); 162 web_contents->GetBrowserContext())).get());
162 HistoryTabHelper::CreateForWebContents(web_contents); 163 HistoryTabHelper::CreateForWebContents(web_contents);
163 InfoBarService::CreateForWebContents(web_contents); 164 InfoBarService::CreateForWebContents(web_contents);
164 ManagePasswordsUIController::CreateForWebContents(web_contents); 165 ManagePasswordsUIController::CreateForWebContents(web_contents);
165 NavigationCorrectionTabObserver::CreateForWebContents(web_contents); 166 NavigationCorrectionTabObserver::CreateForWebContents(web_contents);
166 NavigationMetricsRecorder::CreateForWebContents(web_contents); 167 NavigationMetricsRecorder::CreateForWebContents(web_contents);
167 sessions::ContentLiveTab::CreateForWebContents(web_contents); 168 sessions::ContentLiveTab::CreateForWebContents(web_contents);
169 page_load_metrics::MetricsWebContentsObserver::CreateForWebContents(
170 web_contents);
168 PopupBlockerTabHelper::CreateForWebContents(web_contents); 171 PopupBlockerTabHelper::CreateForWebContents(web_contents);
169 PrefsTabHelper::CreateForWebContents(web_contents); 172 PrefsTabHelper::CreateForWebContents(web_contents);
170 prerender::PrerenderTabHelper::CreateForWebContents(web_contents); 173 prerender::PrerenderTabHelper::CreateForWebContents(web_contents);
171 SearchTabHelper::CreateForWebContents(web_contents); 174 SearchTabHelper::CreateForWebContents(web_contents);
172 SecurityStateModel::CreateForWebContents(web_contents); 175 SecurityStateModel::CreateForWebContents(web_contents);
173 if (SiteEngagementService::IsEnabled()) 176 if (SiteEngagementService::IsEnabled())
174 SiteEngagementHelper::CreateForWebContents(web_contents); 177 SiteEngagementHelper::CreateForWebContents(web_contents);
175 // TODO(vabr): Remove TabSpecificContentSettings from here once their function 178 // TODO(vabr): Remove TabSpecificContentSettings from here once their function
176 // is taken over by ChromeContentSettingsClient. http://crbug.com/387075 179 // is taken over by ChromeContentSettingsClient. http://crbug.com/387075
177 TabSpecificContentSettings::CreateForWebContents(web_contents); 180 TabSpecificContentSettings::CreateForWebContents(web_contents);
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
246 web_contents); 249 web_contents);
247 } 250 }
248 251
249 if (base::CommandLine::ForCurrentProcess()->HasSwitch( 252 if (base::CommandLine::ForCurrentProcess()->HasSwitch(
250 switches::kEnableNavigationTracing) && 253 switches::kEnableNavigationTracing) &&
251 base::CommandLine::ForCurrentProcess()->HasSwitch( 254 base::CommandLine::ForCurrentProcess()->HasSwitch(
252 switches::kTraceUploadURL)) { 255 switches::kTraceUploadURL)) {
253 tracing::NavigationTracingObserver::CreateForWebContents(web_contents); 256 tracing::NavigationTracingObserver::CreateForWebContents(web_contents);
254 } 257 }
255 } 258 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698