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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/appmenu/AppMenuPropertiesDelegate.java

Issue 2301633002: Refactor Vr activity into ChromeTabbedActivity. (Closed)
Patch Set: Clean up vr_util Created 4 years, 4 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/appmenu/AppMenuPropertiesDelegate.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/appmenu/AppMenuPropertiesDelegate.java b/chrome/android/java/src/org/chromium/chrome/browser/appmenu/AppMenuPropertiesDelegate.java
index bff2727279714648427652c471ea961f7eebac9f..51c3bb989410b072386c26eab02bf45cf23d2803 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/appmenu/AppMenuPropertiesDelegate.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/appmenu/AppMenuPropertiesDelegate.java
@@ -36,6 +36,9 @@ public class AppMenuPropertiesDelegate {
private static final int RELOAD_BUTTON_LEVEL_RELOAD = 0;
private static final int RELOAD_BUTTON_LEVEL_STOP_LOADING = 1;
+ // Enables VR menu item for debugging VR.
+ private static final boolean DEBUG_VR = false;
+
protected MenuItem mReloadMenuItem;
protected final ChromeActivity mActivity;
@@ -173,6 +176,10 @@ public class AppMenuPropertiesDelegate {
// Only display reader mode settings menu option if the current page is in reader mode.
menu.findItem(R.id.reader_mode_prefs_id)
.setVisible(DomDistillerUrlUtils.isDistilledPage(currentTab.getUrl()));
+
+ // Only display the Enter VR button if VR Shell is enabled.
+ boolean showVrMenuItem = DEBUG_VR && mActivity.isVrShellEnabled();
amp 2016/09/01 20:50:40 This requires a code change to see the menu item,
Ted C 2016/09/01 22:38:37 For now, it seems like you could just have isVrShe
mthiesse 2016/09/02 01:05:33 Done.
+ menu.findItem(R.id.enter_vr_id).setVisible(showVrMenuItem);
}
if (isOverviewMenu) {

Powered by Google App Engine
This is Rietveld 408576698