Chromium Code Reviews| 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 <memory> | 7 #include <memory> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 70 #include "extensions/features/features.h" | 70 #include "extensions/features/features.h" |
| 71 #include "printing/features/features.h" | 71 #include "printing/features/features.h" |
| 72 | 72 |
| 73 #if defined(OS_ANDROID) | 73 #if defined(OS_ANDROID) |
| 74 #include "chrome/browser/android/banners/app_banner_manager_android.h" | 74 #include "chrome/browser/android/banners/app_banner_manager_android.h" |
| 75 #include "chrome/browser/android/data_usage/data_use_tab_helper.h" | 75 #include "chrome/browser/android/data_usage/data_use_tab_helper.h" |
| 76 #include "chrome/browser/android/offline_pages/offline_page_tab_helper.h" | 76 #include "chrome/browser/android/offline_pages/offline_page_tab_helper.h" |
| 77 #include "chrome/browser/android/offline_pages/recent_tab_helper.h" | 77 #include "chrome/browser/android/offline_pages/recent_tab_helper.h" |
| 78 #include "chrome/browser/android/search_geolocation/search_geolocation_disclosur e_tab_helper.h" | 78 #include "chrome/browser/android/search_geolocation/search_geolocation_disclosur e_tab_helper.h" |
| 79 #include "chrome/browser/android/voice_search_tab_helper.h" | 79 #include "chrome/browser/android/voice_search_tab_helper.h" |
| 80 | |
| 81 #include "device/vr/features/features.h" | |
|
Ted C
2017/05/11 18:32:23
why this include? why not in the ifdef if needed?
Ian Vollick
2017/05/11 19:30:10
IIUC, it's needed for the following ifdef to work
| |
| 82 #if BUILDFLAG(ENABLE_VR) | |
| 83 #include "chrome/browser/android/vr_shell/vr_tab_helper.h" | |
| 84 #endif // BUILDFLAG(ENABLE_VR) | |
| 85 | |
| 80 #include "chrome/browser/android/webapps/single_tab_mode_tab_helper.h" | 86 #include "chrome/browser/android/webapps/single_tab_mode_tab_helper.h" |
| 81 #include "chrome/browser/ui/android/context_menu_helper.h" | 87 #include "chrome/browser/ui/android/context_menu_helper.h" |
| 82 #include "chrome/browser/ui/android/view_android_helper.h" | 88 #include "chrome/browser/ui/android/view_android_helper.h" |
| 83 #else | 89 #else |
| 84 #include "chrome/browser/banners/app_banner_manager_desktop.h" | 90 #include "chrome/browser/banners/app_banner_manager_desktop.h" |
| 85 #include "chrome/browser/plugins/plugin_observer.h" | 91 #include "chrome/browser/plugins/plugin_observer.h" |
| 86 #include "chrome/browser/safe_browsing/safe_browsing_navigation_observer.h" | 92 #include "chrome/browser/safe_browsing/safe_browsing_navigation_observer.h" |
| 87 #include "chrome/browser/safe_browsing/safe_browsing_tab_observer.h" | 93 #include "chrome/browser/safe_browsing/safe_browsing_tab_observer.h" |
| 88 #include "chrome/browser/thumbnails/thumbnail_tab_helper.h" | 94 #include "chrome/browser/thumbnails/thumbnail_tab_helper.h" |
| 89 #include "chrome/browser/ui/bookmarks/bookmark_tab_helper.h" | 95 #include "chrome/browser/ui/bookmarks/bookmark_tab_helper.h" |
| (...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 223 ContextMenuHelper::CreateForWebContents(web_contents); | 229 ContextMenuHelper::CreateForWebContents(web_contents); |
| 224 DataUseTabHelper::CreateForWebContents(web_contents); | 230 DataUseTabHelper::CreateForWebContents(web_contents); |
| 225 | 231 |
| 226 offline_pages::OfflinePageTabHelper::CreateForWebContents(web_contents); | 232 offline_pages::OfflinePageTabHelper::CreateForWebContents(web_contents); |
| 227 offline_pages::RecentTabHelper::CreateForWebContents(web_contents); | 233 offline_pages::RecentTabHelper::CreateForWebContents(web_contents); |
| 228 | 234 |
| 229 SearchGeolocationDisclosureTabHelper::CreateForWebContents(web_contents); | 235 SearchGeolocationDisclosureTabHelper::CreateForWebContents(web_contents); |
| 230 SingleTabModeTabHelper::CreateForWebContents(web_contents); | 236 SingleTabModeTabHelper::CreateForWebContents(web_contents); |
| 231 ViewAndroidHelper::CreateForWebContents(web_contents); | 237 ViewAndroidHelper::CreateForWebContents(web_contents); |
| 232 VoiceSearchTabHelper::CreateForWebContents(web_contents); | 238 VoiceSearchTabHelper::CreateForWebContents(web_contents); |
| 239 | |
| 240 #if BUILDFLAG(ENABLE_VR) | |
| 241 vr_shell::VrTabHelper::CreateForWebContents(web_contents); | |
| 242 #endif | |
| 243 | |
| 233 #else | 244 #else |
| 234 BookmarkTabHelper::CreateForWebContents(web_contents); | 245 BookmarkTabHelper::CreateForWebContents(web_contents); |
| 235 extensions::ChromeExtensionWebContentsObserver::CreateForWebContents( | 246 extensions::ChromeExtensionWebContentsObserver::CreateForWebContents( |
| 236 web_contents); | 247 web_contents); |
| 237 extensions::WebNavigationTabObserver::CreateForWebContents(web_contents); | 248 extensions::WebNavigationTabObserver::CreateForWebContents(web_contents); |
| 238 HungPluginTabHelper::CreateForWebContents(web_contents); | 249 HungPluginTabHelper::CreateForWebContents(web_contents); |
| 239 JavaScriptDialogTabHelper::CreateForWebContents(web_contents); | 250 JavaScriptDialogTabHelper::CreateForWebContents(web_contents); |
| 240 ManagePasswordsUIController::CreateForWebContents(web_contents); | 251 ManagePasswordsUIController::CreateForWebContents(web_contents); |
| 241 pdf::PDFWebContentsHelper::CreateForWebContentsWithClient( | 252 pdf::PDFWebContentsHelper::CreateForWebContentsWithClient( |
| 242 web_contents, std::unique_ptr<pdf::PDFWebContentsHelperClient>( | 253 web_contents, std::unique_ptr<pdf::PDFWebContentsHelperClient>( |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 292 | 303 |
| 293 if (predictors::ResourcePrefetchPredictorFactory::GetForProfile( | 304 if (predictors::ResourcePrefetchPredictorFactory::GetForProfile( |
| 294 web_contents->GetBrowserContext())) { | 305 web_contents->GetBrowserContext())) { |
| 295 predictors::ResourcePrefetchPredictorTabHelper::CreateForWebContents( | 306 predictors::ResourcePrefetchPredictorTabHelper::CreateForWebContents( |
| 296 web_contents); | 307 web_contents); |
| 297 } | 308 } |
| 298 | 309 |
| 299 if (tracing::NavigationTracingObserver::IsEnabled()) | 310 if (tracing::NavigationTracingObserver::IsEnabled()) |
| 300 tracing::NavigationTracingObserver::CreateForWebContents(web_contents); | 311 tracing::NavigationTracingObserver::CreateForWebContents(web_contents); |
| 301 } | 312 } |
| OLD | NEW |