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

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

Issue 2229353003: Clean up document-mode specific UI. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove unused fields. 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 0516138f48a22976ad81a202db1c984c230e5d5c..ef63c84c0cbe4b9c94ccc6efeb5421037c1ab2b0 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
@@ -4,7 +4,6 @@
package org.chromium.chrome.browser.appmenu;
-import android.text.TextUtils;
import android.view.Menu;
import android.view.MenuItem;
@@ -173,17 +172,12 @@ public class AppMenuPropertiesDelegate {
}
}
- // Incognito NTP in Document mode should not show "New incognito tab" menu item.
- boolean incognitoItemVisible = !FeatureUtilities.isDocumentMode(mActivity)
- || (currentTab == null)
- || !(TextUtils.equals(currentTab.getUrl(), UrlConstants.NTP_URL) && isIncognito);
-
// Disable new incognito tab when it is blocked (e.g. by a policy).
// findItem(...).setEnabled(...)" is not enough here, because of the inflated
// main_menu.xml contains multiple items with the same id in different groups
// e.g.: new_incognito_tab_menu_id.
disableEnableMenuItem(menu, R.id.new_incognito_tab_menu_id,
- incognitoItemVisible,
+ true,
PrefServiceBridge.getInstance().isIncognitoModeEnabled(),
PrefServiceBridge.getInstance().isIncognitoModeManaged());
mActivity.prepareMenu(menu);

Powered by Google App Engine
This is Rietveld 408576698