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

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

Issue 2680723003: Remove ENABLE_VR_SHELL compile-time define. (Closed)
Patch Set: Fix lint warnings generated by vr_shell's new pickier checks. 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
« no previous file with comments | « chrome/browser/android/vr_shell/vr_shell.h ('k') | chrome/browser/android/vr_shell/vr_shell_delegate.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 d77ea0bc040bed3e4a4c0d53920e6f198d74578f..956c7b6940683732e5ddaadcc362aea49af265ec 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,
@@ -479,7 +480,7 @@ void VrShell::OnVRVsyncProviderRequest(
base::Passed(&request)));
}
-void VrShell::UpdateVSyncInterval(long timebase_nanos,
+void VrShell::UpdateVSyncInterval(int64_t timebase_nanos,
double interval_seconds) {
PostToGlThreadWhenReady(
base::Bind(&VrShellGl::UpdateVSyncInterval,
« no previous file with comments | « chrome/browser/android/vr_shell/vr_shell.h ('k') | chrome/browser/android/vr_shell/vr_shell_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698