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

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

Issue 2727873002: Implement lazy initialization for VrShellDelegate (Closed)
Patch Set: Fix FindBugs errors - neat! 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/android/javatests/src/org/chromium/chrome/browser/vr_shell/VrUtils.java
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/vr_shell/VrUtils.java b/chrome/android/javatests/src/org/chromium/chrome/browser/vr_shell/VrUtils.java
index 0a3ba8ebc56b2c6a9f295e95f9360ebbb3ef43bf..71902629abb94f62a9b9869fe0b6ec3b5d3c7a9f 100644
--- a/chrome/android/javatests/src/org/chromium/chrome/browser/vr_shell/VrUtils.java
+++ b/chrome/android/javatests/src/org/chromium/chrome/browser/vr_shell/VrUtils.java
@@ -42,13 +42,12 @@ public class VrUtils {
/**
* Forces the browser into VR mode via a VrShellDelegate call.
- * @param vrDelegate The VRShellDelegate associated with this activity.
*/
- public static void forceEnterVr(final VrShellDelegate vrDelegate) {
+ public static void forceEnterVr() {
ThreadUtils.runOnUiThreadBlocking(new Runnable() {
@Override
public void run() {
- vrDelegate.enterVRIfNecessary();
+ VrShellDelegate.enterVRIfNecessary();
}
});
}
@@ -114,15 +113,14 @@ public class VrUtils {
/**
* Waits until the given VrShellDelegate's isInVR() returns true. Should
* only be used when VR Shell support is expected.
- * @param delegate The delegate whose VR status will be polled
*/
- public static void waitForVrSupported(final VrShellDelegate delegate) {
+ public static void waitForVrSupported() {
// If VR Shell is supported, mInVr should eventually go to true
// Relatively long timeout because sometimes GVR takes a while to enter VR
CriteriaHelper.pollUiThread(Criteria.equals(true, new Callable<Boolean>() {
@Override
public Boolean call() {
- return delegate.isInVR();
+ return VrShellDelegate.isInVR();
}
}), 10000, 50);
}

Powered by Google App Engine
This is Rietveld 408576698