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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/vr_shell/VrShellDelegate.java

Issue 2899513002: Add the ability to configure feedback prompt frequency (Closed)
Patch Set: rebase master Created 3 years, 7 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/android/java/src/org/chromium/chrome/browser/vr_shell/VrShellDelegate.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/vr_shell/VrShellDelegate.java b/chrome/android/java/src/org/chromium/chrome/browser/vr_shell/VrShellDelegate.java
index de1524f0de7b7ce5444f639a321acc9845c60b95..c5af34a9b6a4b16366d22ec360e73dbef67293f9 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/vr_shell/VrShellDelegate.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/vr_shell/VrShellDelegate.java
@@ -94,9 +94,6 @@ public class VrShellDelegate implements ApplicationStatus.ActivityStateListener,
private static final long REENTER_VR_TIMEOUT_MS = 1000;
- // TODO(ymalik): This should be configurable via Finch.
- private static final int FEEDBACK_FREQUENCY = 10;
-
private static final int VR_SYSTEM_UI_FLAGS = View.SYSTEM_UI_FLAG_LAYOUT_STABLE
| View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
| View.SYSTEM_UI_FLAG_HIDE_NAVIGATION | View.SYSTEM_UI_FLAG_FULLSCREEN
@@ -349,7 +346,8 @@ public class VrShellDelegate implements ApplicationStatus.ActivityStateListener,
}
private static boolean activitySupportsExitFeedback(Activity activity) {
- return activity instanceof ChromeTabbedActivity;
+ return activity instanceof ChromeTabbedActivity
+ && ChromeFeatureList.isEnabled(ChromeFeatureList.VR_BROWSING_FEEDBACK);
}
/**
@@ -426,7 +424,7 @@ public class VrShellDelegate implements ApplicationStatus.ActivityStateListener,
mPaused = ApplicationStatus.getStateForActivity(activity) != ActivityState.RESUMED;
updateVrSupportLevel();
mNativeVrShellDelegate = nativeInit();
- mFeedbackFrequency = FEEDBACK_FREQUENCY;
+ mFeedbackFrequency = VrFeedbackStatus.getFeedbackFrequency();
Choreographer choreographer = Choreographer.getInstance();
choreographer.postFrameCallback(new FrameCallback() {
@Override

Powered by Google App Engine
This is Rietveld 408576698