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

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

Issue 2975593002: [vr] Deny permission requests in VR mode
Patch Set: . Created 3 years, 5 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 | « chrome/browser/ui/browser_unittest.cc ('k') | chrome/browser/vr/vr_tab_helper.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 <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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 #include "chrome/browser/ui/blocked_content/popup_blocker_tab_helper.h" 50 #include "chrome/browser/ui/blocked_content/popup_blocker_tab_helper.h"
51 #include "chrome/browser/ui/find_bar/find_tab_helper.h" 51 #include "chrome/browser/ui/find_bar/find_tab_helper.h"
52 #include "chrome/browser/ui/navigation_correction_tab_observer.h" 52 #include "chrome/browser/ui/navigation_correction_tab_observer.h"
53 #include "chrome/browser/ui/passwords/manage_passwords_ui_controller.h" 53 #include "chrome/browser/ui/passwords/manage_passwords_ui_controller.h"
54 #include "chrome/browser/ui/pdf/chrome_pdf_web_contents_helper_client.h" 54 #include "chrome/browser/ui/pdf/chrome_pdf_web_contents_helper_client.h"
55 #include "chrome/browser/ui/prefs/prefs_tab_helper.h" 55 #include "chrome/browser/ui/prefs/prefs_tab_helper.h"
56 #include "chrome/browser/ui/search/search_tab_helper.h" 56 #include "chrome/browser/ui/search/search_tab_helper.h"
57 #include "chrome/browser/ui/search_engines/search_engine_tab_helper.h" 57 #include "chrome/browser/ui/search_engines/search_engine_tab_helper.h"
58 #include "chrome/browser/ui/tab_contents/core_tab_helper.h" 58 #include "chrome/browser/ui/tab_contents/core_tab_helper.h"
59 #include "chrome/browser/ui/tab_dialogs.h" 59 #include "chrome/browser/ui/tab_dialogs.h"
60 #include "chrome/browser/vr/vr_tab_helper.h"
60 #include "chrome/common/chrome_switches.h" 61 #include "chrome/common/chrome_switches.h"
61 #include "chrome/common/features.h" 62 #include "chrome/common/features.h"
62 #include "components/autofill/content/browser/content_autofill_driver_factory.h" 63 #include "components/autofill/content/browser/content_autofill_driver_factory.h"
63 #include "components/autofill/core/browser/autofill_manager.h" 64 #include "components/autofill/core/browser/autofill_manager.h"
64 #include "components/dom_distiller/content/browser/web_contents_main_frame_obser ver.h" 65 #include "components/dom_distiller/content/browser/web_contents_main_frame_obser ver.h"
65 #include "components/dom_distiller/core/dom_distiller_switches.h" 66 #include "components/dom_distiller/core/dom_distiller_switches.h"
66 #include "components/history/content/browser/web_contents_top_sites_observer.h" 67 #include "components/history/content/browser/web_contents_top_sites_observer.h"
67 #include "components/history/core/browser/top_sites.h" 68 #include "components/history/core/browser/top_sites.h"
68 #include "components/password_manager/core/browser/password_manager.h" 69 #include "components/password_manager/core/browser/password_manager.h"
69 #include "components/subresource_filter/content/browser/content_subresource_filt er_driver_factory.h" 70 #include "components/subresource_filter/content/browser/content_subresource_filt er_driver_factory.h"
70 #include "components/subresource_filter/core/browser/subresource_filter_features .h" 71 #include "components/subresource_filter/core/browser/subresource_filter_features .h"
71 #include "components/tracing/common/tracing_switches.h" 72 #include "components/tracing/common/tracing_switches.h"
72 #include "content/public/browser/web_contents.h" 73 #include "content/public/browser/web_contents.h"
73 #include "content/public/common/browser_side_navigation_policy.h" 74 #include "content/public/common/browser_side_navigation_policy.h"
74 #include "extensions/features/features.h" 75 #include "extensions/features/features.h"
75 #include "printing/features/features.h" 76 #include "printing/features/features.h"
76 77
77 #if defined(OS_ANDROID) 78 #if defined(OS_ANDROID)
78 #include "chrome/browser/android/banners/app_banner_manager_android.h" 79 #include "chrome/browser/android/banners/app_banner_manager_android.h"
79 #include "chrome/browser/android/data_usage/data_use_tab_helper.h" 80 #include "chrome/browser/android/data_usage/data_use_tab_helper.h"
80 #include "chrome/browser/android/offline_pages/offline_page_tab_helper.h" 81 #include "chrome/browser/android/offline_pages/offline_page_tab_helper.h"
81 #include "chrome/browser/android/offline_pages/recent_tab_helper.h" 82 #include "chrome/browser/android/offline_pages/recent_tab_helper.h"
82 #include "chrome/browser/android/search_geolocation/search_geolocation_disclosur e_tab_helper.h" 83 #include "chrome/browser/android/search_geolocation/search_geolocation_disclosur e_tab_helper.h"
83 #include "chrome/browser/android/voice_search_tab_helper.h" 84 #include "chrome/browser/android/voice_search_tab_helper.h"
84
85 #include "device/vr/features/features.h" // nogncheck
86 #if BUILDFLAG(ENABLE_VR)
87 #include "chrome/browser/android/vr_shell/vr_tab_helper.h"
88 #endif // BUILDFLAG(ENABLE_VR)
89
90 #include "chrome/browser/android/webapps/single_tab_mode_tab_helper.h" 85 #include "chrome/browser/android/webapps/single_tab_mode_tab_helper.h"
91 #include "chrome/browser/ui/android/context_menu_helper.h" 86 #include "chrome/browser/ui/android/context_menu_helper.h"
92 #include "chrome/browser/ui/android/view_android_helper.h" 87 #include "chrome/browser/ui/android/view_android_helper.h"
93 #else 88 #else
94 #include "chrome/browser/banners/app_banner_manager_desktop.h" 89 #include "chrome/browser/banners/app_banner_manager_desktop.h"
95 #include "chrome/browser/plugins/plugin_observer.h" 90 #include "chrome/browser/plugins/plugin_observer.h"
96 #include "chrome/browser/safe_browsing/safe_browsing_navigation_observer.h" 91 #include "chrome/browser/safe_browsing/safe_browsing_navigation_observer.h"
97 #include "chrome/browser/safe_browsing/safe_browsing_tab_observer.h" 92 #include "chrome/browser/safe_browsing/safe_browsing_tab_observer.h"
98 #include "chrome/browser/thumbnails/thumbnail_tab_helper.h" 93 #include "chrome/browser/thumbnails/thumbnail_tab_helper.h"
99 #include "chrome/browser/ui/bookmarks/bookmark_tab_helper.h" 94 #include "chrome/browser/ui/bookmarks/bookmark_tab_helper.h"
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
221 SecurityStateTabHelper::CreateForWebContents(web_contents); 216 SecurityStateTabHelper::CreateForWebContents(web_contents);
222 if (SiteEngagementService::IsEnabled()) 217 if (SiteEngagementService::IsEnabled())
223 SiteEngagementService::Helper::CreateForWebContents(web_contents); 218 SiteEngagementService::Helper::CreateForWebContents(web_contents);
224 sync_sessions::SyncSessionsRouterTabHelper::CreateForWebContents( 219 sync_sessions::SyncSessionsRouterTabHelper::CreateForWebContents(
225 web_contents, 220 web_contents,
226 sync_sessions::SyncSessionsWebContentsRouterFactory::GetForProfile( 221 sync_sessions::SyncSessionsWebContentsRouterFactory::GetForProfile(
227 Profile::FromBrowserContext(web_contents->GetBrowserContext()))); 222 Profile::FromBrowserContext(web_contents->GetBrowserContext())));
228 // TODO(vabr): Remove TabSpecificContentSettings from here once their function 223 // TODO(vabr): Remove TabSpecificContentSettings from here once their function
229 // is taken over by ChromeContentSettingsClient. http://crbug.com/387075 224 // is taken over by ChromeContentSettingsClient. http://crbug.com/387075
230 TabSpecificContentSettings::CreateForWebContents(web_contents); 225 TabSpecificContentSettings::CreateForWebContents(web_contents);
226 vr::VrTabHelper::CreateForWebContents(web_contents);
231 227
232 // NO! Do not just add your tab helper here. This is a large alphabetized 228 // NO! Do not just add your tab helper here. This is a large alphabetized
233 // block; please insert your tab helper above in alphabetical order. 229 // block; please insert your tab helper above in alphabetical order.
234 230
235 // --- Platform-specific tab helpers --- 231 // --- Platform-specific tab helpers ---
236 232
237 #if defined(OS_ANDROID) 233 #if defined(OS_ANDROID)
238 banners::AppBannerManagerAndroid::CreateForWebContents(web_contents); 234 banners::AppBannerManagerAndroid::CreateForWebContents(web_contents);
239 ContextMenuHelper::CreateForWebContents(web_contents); 235 ContextMenuHelper::CreateForWebContents(web_contents);
240 DataUseTabHelper::CreateForWebContents(web_contents); 236 DataUseTabHelper::CreateForWebContents(web_contents);
241 237
242 offline_pages::OfflinePageTabHelper::CreateForWebContents(web_contents); 238 offline_pages::OfflinePageTabHelper::CreateForWebContents(web_contents);
243 offline_pages::RecentTabHelper::CreateForWebContents(web_contents); 239 offline_pages::RecentTabHelper::CreateForWebContents(web_contents);
244 240
245 SearchGeolocationDisclosureTabHelper::CreateForWebContents(web_contents); 241 SearchGeolocationDisclosureTabHelper::CreateForWebContents(web_contents);
246 SingleTabModeTabHelper::CreateForWebContents(web_contents); 242 SingleTabModeTabHelper::CreateForWebContents(web_contents);
247 ViewAndroidHelper::CreateForWebContents(web_contents); 243 ViewAndroidHelper::CreateForWebContents(web_contents);
248 VoiceSearchTabHelper::CreateForWebContents(web_contents); 244 VoiceSearchTabHelper::CreateForWebContents(web_contents);
249
250 #if BUILDFLAG(ENABLE_VR)
251 vr_shell::VrTabHelper::CreateForWebContents(web_contents);
252 #endif
253
254 #else 245 #else
255 BookmarkTabHelper::CreateForWebContents(web_contents); 246 BookmarkTabHelper::CreateForWebContents(web_contents);
256 extensions::ChromeExtensionWebContentsObserver::CreateForWebContents( 247 extensions::ChromeExtensionWebContentsObserver::CreateForWebContents(
257 web_contents); 248 web_contents);
258 extensions::WebNavigationTabObserver::CreateForWebContents(web_contents); 249 extensions::WebNavigationTabObserver::CreateForWebContents(web_contents);
259 HungPluginTabHelper::CreateForWebContents(web_contents); 250 HungPluginTabHelper::CreateForWebContents(web_contents);
260 JavaScriptDialogTabHelper::CreateForWebContents(web_contents); 251 JavaScriptDialogTabHelper::CreateForWebContents(web_contents);
261 ManagePasswordsUIController::CreateForWebContents(web_contents); 252 ManagePasswordsUIController::CreateForWebContents(web_contents);
262 pdf::PDFWebContentsHelper::CreateForWebContentsWithClient( 253 pdf::PDFWebContentsHelper::CreateForWebContentsWithClient(
263 web_contents, std::unique_ptr<pdf::PDFWebContentsHelperClient>( 254 web_contents, std::unique_ptr<pdf::PDFWebContentsHelperClient>(
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
319 310
320 if (tracing::NavigationTracingObserver::IsEnabled()) 311 if (tracing::NavigationTracingObserver::IsEnabled())
321 tracing::NavigationTracingObserver::CreateForWebContents(web_contents); 312 tracing::NavigationTracingObserver::CreateForWebContents(web_contents);
322 313
323 if (MediaEngagementService::IsEnabled()) 314 if (MediaEngagementService::IsEnabled())
324 MediaEngagementService::CreateWebContentsObserver(web_contents); 315 MediaEngagementService::CreateWebContentsObserver(web_contents);
325 316
326 if (ResourceCoordinatorWebContentsObserver::IsEnabled()) 317 if (ResourceCoordinatorWebContentsObserver::IsEnabled())
327 ResourceCoordinatorWebContentsObserver::CreateForWebContents(web_contents); 318 ResourceCoordinatorWebContentsObserver::CreateForWebContents(web_contents);
328 } 319 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/browser_unittest.cc ('k') | chrome/browser/vr/vr_tab_helper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698