| OLD | NEW |
| 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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 #include "components/password_manager/core/browser/password_manager.h" | 47 #include "components/password_manager/core/browser/password_manager.h" |
| 48 #include "components/tracing/tracing_switches.h" | 48 #include "components/tracing/tracing_switches.h" |
| 49 #include "content/public/browser/web_contents.h" | 49 #include "content/public/browser/web_contents.h" |
| 50 | 50 |
| 51 #if defined(OS_ANDROID) | 51 #if defined(OS_ANDROID) |
| 52 #include "chrome/browser/android/offline_pages/offline_page_web_contents_observe
r.h" | 52 #include "chrome/browser/android/offline_pages/offline_page_web_contents_observe
r.h" |
| 53 #include "chrome/browser/android/voice_search_tab_helper.h" | 53 #include "chrome/browser/android/voice_search_tab_helper.h" |
| 54 #include "chrome/browser/android/webapps/single_tab_mode_tab_helper.h" | 54 #include "chrome/browser/android/webapps/single_tab_mode_tab_helper.h" |
| 55 #include "chrome/browser/ui/android/context_menu_helper.h" | 55 #include "chrome/browser/ui/android/context_menu_helper.h" |
| 56 #include "chrome/browser/ui/android/window_android_helper.h" | 56 #include "chrome/browser/ui/android/window_android_helper.h" |
| 57 #include "components/page_load_metrics/browser/page_load_metrics_web_contents_ob
server.h" |
| 57 #else | 58 #else |
| 58 #include "chrome/browser/banners/app_banner_manager_desktop.h" | 59 #include "chrome/browser/banners/app_banner_manager_desktop.h" |
| 59 #include "chrome/browser/plugins/plugin_observer.h" | 60 #include "chrome/browser/plugins/plugin_observer.h" |
| 60 #include "chrome/browser/safe_browsing/safe_browsing_tab_observer.h" | 61 #include "chrome/browser/safe_browsing/safe_browsing_tab_observer.h" |
| 61 #include "chrome/browser/thumbnails/thumbnail_tab_helper.h" | 62 #include "chrome/browser/thumbnails/thumbnail_tab_helper.h" |
| 62 #include "chrome/browser/ui/hung_plugin_tab_helper.h" | 63 #include "chrome/browser/ui/hung_plugin_tab_helper.h" |
| 63 #include "chrome/browser/ui/sad_tab_helper.h" | 64 #include "chrome/browser/ui/sad_tab_helper.h" |
| 64 #include "chrome/browser/ui/search_engines/search_engine_tab_helper.h" | 65 #include "chrome/browser/ui/search_engines/search_engine_tab_helper.h" |
| 65 #include "chrome/browser/ui/sync/tab_contents_synced_tab_delegate.h" | 66 #include "chrome/browser/ui/sync/tab_contents_synced_tab_delegate.h" |
| 66 #include "chrome/browser/ui/website_settings/permission_bubble_manager.h" | 67 #include "chrome/browser/ui/website_settings/permission_bubble_manager.h" |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 175 | 176 |
| 176 // --- Platform-specific tab helpers --- | 177 // --- Platform-specific tab helpers --- |
| 177 | 178 |
| 178 #if defined(OS_ANDROID) | 179 #if defined(OS_ANDROID) |
| 179 ContextMenuHelper::CreateForWebContents(web_contents); | 180 ContextMenuHelper::CreateForWebContents(web_contents); |
| 180 offline_pages::OfflinePageWebContentsObserver::CreateForWebContents( | 181 offline_pages::OfflinePageWebContentsObserver::CreateForWebContents( |
| 181 web_contents); | 182 web_contents); |
| 182 SingleTabModeTabHelper::CreateForWebContents(web_contents); | 183 SingleTabModeTabHelper::CreateForWebContents(web_contents); |
| 183 VoiceSearchTabHelper::CreateForWebContents(web_contents); | 184 VoiceSearchTabHelper::CreateForWebContents(web_contents); |
| 184 WindowAndroidHelper::CreateForWebContents(web_contents); | 185 WindowAndroidHelper::CreateForWebContents(web_contents); |
| 186 |
| 187 // TODO(bmcquade): run on all platforms once crbug.com/521010 is resolved. |
| 188 page_load_metrics::PageLoadMetricsWebContentsObserver::CreateForWebContents( |
| 189 web_contents); |
| 185 #else | 190 #else |
| 186 extensions::ChromeExtensionWebContentsObserver::CreateForWebContents( | 191 extensions::ChromeExtensionWebContentsObserver::CreateForWebContents( |
| 187 web_contents); | 192 web_contents); |
| 188 extensions::WebNavigationTabObserver::CreateForWebContents(web_contents); | 193 extensions::WebNavigationTabObserver::CreateForWebContents(web_contents); |
| 189 HungPluginTabHelper::CreateForWebContents(web_contents); | 194 HungPluginTabHelper::CreateForWebContents(web_contents); |
| 190 pdf::PDFWebContentsHelper::CreateForWebContentsWithClient( | 195 pdf::PDFWebContentsHelper::CreateForWebContentsWithClient( |
| 191 web_contents, | 196 web_contents, |
| 192 scoped_ptr<pdf::PDFWebContentsHelperClient>( | 197 scoped_ptr<pdf::PDFWebContentsHelperClient>( |
| 193 new ChromePDFWebContentsHelperClient())); | 198 new ChromePDFWebContentsHelperClient())); |
| 194 PermissionBubbleManager::CreateForWebContents(web_contents); | 199 PermissionBubbleManager::CreateForWebContents(web_contents); |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 245 web_contents); | 250 web_contents); |
| 246 } | 251 } |
| 247 | 252 |
| 248 if (base::CommandLine::ForCurrentProcess()->HasSwitch( | 253 if (base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 249 switches::kEnableNavigationTracing) && | 254 switches::kEnableNavigationTracing) && |
| 250 base::CommandLine::ForCurrentProcess()->HasSwitch( | 255 base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 251 switches::kTraceUploadURL)) { | 256 switches::kTraceUploadURL)) { |
| 252 tracing::NavigationTracingObserver::CreateForWebContents(web_contents); | 257 tracing::NavigationTracingObserver::CreateForWebContents(web_contents); |
| 253 } | 258 } |
| 254 } | 259 } |
| OLD | NEW |