Chromium Code Reviews| Index: chrome/browser/android/vr_shell/vr_shell.cc |
| diff --git a/chrome/browser/android/vr_shell/vr_shell.cc b/chrome/browser/android/vr_shell/vr_shell.cc |
| index e1d651507a47dbd1f60e62474e5b3e9257b006a5..32345ad27caa3c5c6b52548d0f1b7ece1d4dd04a 100644 |
| --- a/chrome/browser/android/vr_shell/vr_shell.cc |
| +++ b/chrome/browser/android/vr_shell/vr_shell.cc |
| @@ -31,6 +31,7 @@ |
| #include "content/public/browser/render_widget_host.h" |
| #include "content/public/browser/render_widget_host_view.h" |
| #include "content/public/browser/web_contents.h" |
| +#include "content/public/common/content_features.h" |
| #include "content/public/common/referrer.h" |
| #include "device/vr/android/gvr/gvr_device.h" |
| #include "device/vr/android/gvr/gvr_device_provider.h" |
| @@ -72,6 +73,7 @@ VrShell::VrShell(JNIEnv* env, |
| gvr_context* gvr_api, |
| bool reprojected_rendering) |
| : WebContentsObserver(ui_contents), |
| + feature_enabled_(base::FeatureList::IsEnabled(features::kVrShell)), |
|
amp
2017/02/07 19:26:01
I think the preference is to check the feature dir
cjgrant
2017/02/07 20:10:17
Why would we want to incur this extra overhead on
amp
2017/02/07 20:23:10
I'm not familiar with the overhead differences in
|
| main_contents_(main_contents), |
| content_compositor_( |
| base::MakeUnique<VrCompositor>(content_window, false)), |
| @@ -334,9 +336,8 @@ void VrShell::GvrDelegateReady() { |
| } |
| void VrShell::AppButtonPressed() { |
| -#if defined(ENABLE_VR_SHELL) |
| - html_interface_->HandleAppButtonClicked(); |
| -#endif |
| + if (feature_enabled_) |
|
amp
2017/02/07 20:23:10
Isn't this going to be supported in WebVR for menu
cjgrant
2017/02/07 20:28:25
You're right. Once the app button works properly
|
| + html_interface_->HandleAppButtonClicked(); |
| } |
| void VrShell::ContentPhysicalBoundsChanged(JNIEnv* env, |
| @@ -407,6 +408,7 @@ void VrShell::DoUiAction(const UiAction action, |
| SetContentPaused(paused); |
| break; |
| } |
| + |
|
cjgrant
2017/02/07 20:10:17
I'll remove this line.
cjgrant
2017/02/07 22:16:54
Done.
|
| #if defined(ENABLE_VR_SHELL_UI_DEV) |
| case RELOAD_UI: |
| ui_contents_->GetController().Reload(content::ReloadType::NORMAL, false); |