Chromium Code Reviews| Index: chrome/browser/android/tab_web_contents_delegate_android.cc |
| diff --git a/chrome/browser/android/tab_web_contents_delegate_android.cc b/chrome/browser/android/tab_web_contents_delegate_android.cc |
| index fa26ef6cfad50bcdd5315f2e88982dc4be8703f2..a010e88d2954b17d791f8998a99d6fc6f1344d05 100644 |
| --- a/chrome/browser/android/tab_web_contents_delegate_android.cc |
| +++ b/chrome/browser/android/tab_web_contents_delegate_android.cc |
| @@ -13,6 +13,12 @@ |
| #include "chrome/browser/android/banners/app_banner_manager_android.h" |
| #include "chrome/browser/android/feature_utilities.h" |
| #include "chrome/browser/android/hung_renderer_infobar_delegate.h" |
| + |
| +#include "device/vr/features/features.h" |
| +#if BUILDFLAG(ENABLE_VR) |
| +#include "chrome/browser/android/vr_shell/vr_tab_helper.h" |
| +#endif // BUILDFLAG(ENABLE_VR) |
| + |
| #include "chrome/browser/chrome_notification_types.h" |
| #include "chrome/browser/file_select_helper.h" |
| #include "chrome/browser/infobars/infobar_service.h" |
| @@ -119,6 +125,12 @@ void TabWebContentsDelegateAndroid::LoadingStateChanged( |
| void TabWebContentsDelegateAndroid::RunFileChooser( |
| content::RenderFrameHost* render_frame_host, |
| const FileChooserParams& params) { |
| +#if BUILDFLAG(ENABLE_VR) |
|
Ted C
2017/05/11 22:35:05
probably out of scope, but I wonder if we should m
|
| + if (vr_shell::VrTabHelper::IsInVr( |
| + WebContents::FromRenderFrameHost(render_frame_host))) { |
| + return; |
| + } |
| +#endif |
| FileSelectHelper::RunFileChooser(render_frame_host, params); |
| } |
| @@ -255,6 +267,11 @@ void TabWebContentsDelegateAndroid::FindMatchRectsReply( |
| content::JavaScriptDialogManager* |
| TabWebContentsDelegateAndroid::GetJavaScriptDialogManager( |
| WebContents* source) { |
| +#if BUILDFLAG(ENABLE_VR) |
| + if (vr_shell::VrTabHelper::IsInVr(source)) { |
| + return nullptr; |
| + } |
| +#endif |
| return app_modal::JavaScriptDialogManager::GetInstance(); |
| } |