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

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: Rebase. 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
« no previous file with comments | « no previous file | chrome/android/java/src/org/chromium/chrome/browser/externalnav/ExternalNavigationDelegate.java » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 1e1f8c0650f9e7cc40887da45d73403fd285a09e..20d19a4cb5b0e4ebbf2c8f673c31b4ad7396997c 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
@@ -6,7 +6,6 @@ package org.chromium.chrome.browser.appmenu;
import android.graphics.PorterDuff;
import android.graphics.drawable.Drawable;
-import android.text.TextUtils;
import android.view.Menu;
import android.view.MenuItem;
@@ -194,17 +193,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);
« no previous file with comments | « no previous file | chrome/android/java/src/org/chromium/chrome/browser/externalnav/ExternalNavigationDelegate.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698