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 6ea8491b9e3b41178fd4b9e600c6f154c81474e1..4eef3246137b443ecef997138a9a3ba729c068c6 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 |
@@ -764,14 +764,14 @@ public class VrShellDelegate implements ApplicationStatus.ActivityStateListener, |
private static boolean isVrCoreCompatible( |
VrCoreVersionChecker versionChecker, Tab tabToShowInfobarIn) { |
- int vrCoreCompatibility = versionChecker.getVrCoreCompatibility(); |
+ int vrCoreCompatibility = versionChecker.getVrCoreInfo().compatibility; |
- if (vrCoreCompatibility == VrCoreVersionChecker.VR_NOT_AVAILABLE |
- || vrCoreCompatibility == VrCoreVersionChecker.VR_OUT_OF_DATE) { |
+ if (vrCoreCompatibility == VrCoreCompatibility.VR_NOT_AVAILABLE |
+ || vrCoreCompatibility == VrCoreCompatibility.VR_OUT_OF_DATE) { |
promptToUpdateVrServices(vrCoreCompatibility, tabToShowInfobarIn); |
} |
- return vrCoreCompatibility == VrCoreVersionChecker.VR_READY; |
+ return vrCoreCompatibility == VrCoreCompatibility.VR_READY; |
} |
private static void promptToUpdateVrServices(int vrCoreCompatibility, Tab tab) { |
@@ -781,11 +781,11 @@ public class VrShellDelegate implements ApplicationStatus.ActivityStateListener, |
final Activity activity = tab.getActivity(); |
String infobarText; |
String buttonText; |
- if (vrCoreCompatibility == VrCoreVersionChecker.VR_NOT_AVAILABLE) { |
+ if (vrCoreCompatibility == VrCoreCompatibility.VR_NOT_AVAILABLE) { |
// Supported, but not installed. Ask user to install instead of upgrade. |
infobarText = activity.getString(R.string.vr_services_check_infobar_install_text); |
buttonText = activity.getString(R.string.vr_services_check_infobar_install_button); |
- } else if (vrCoreCompatibility == VrCoreVersionChecker.VR_OUT_OF_DATE) { |
+ } else if (vrCoreCompatibility == VrCoreCompatibility.VR_OUT_OF_DATE) { |
infobarText = activity.getString(R.string.vr_services_check_infobar_update_text); |
buttonText = activity.getString(R.string.vr_services_check_infobar_update_button); |
} else { |
@@ -902,6 +902,12 @@ public class VrShellDelegate implements ApplicationStatus.ActivityStateListener, |
return mNativeVrShellDelegate; |
} |
+ @CalledByNative |
+ private long getVrCoreInfo() { |
+ assert mVrCoreVersionChecker != null; |
+ return mVrCoreVersionChecker.getVrCoreInfo().makeNativeVrCoreInfo(); |
+ } |
+ |
private void destroy() { |
if (sInstance == null) return; |
shutdownVr(true, false); |