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

Unified Diff: chrome/browser/android/vr_shell/vr_shell.cc

Issue 2680723003: Remove ENABLE_VR_SHELL compile-time define. (Closed)
Patch Set: Rename vr_shell_enabled_ Created 3 years, 10 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 side-by-side diff with in-line comments
Download patch
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..a8fe46265211341798be8879fd6bf36f9f4553a8 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),
+ vr_shell_enabled_(base::FeatureList::IsEnabled(features::kVrShell)),
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 (vr_shell_enabled_)
+ html_interface_->HandleAppButtonClicked();
}
void VrShell::ContentPhysicalBoundsChanged(JNIEnv* env,

Powered by Google App Engine
This is Rietveld 408576698