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 bbe6a0888dd83a8ddb6e21283e9a261d7112923a..8d701f08bd5d02f32befe04378f01cf5fbd607cc 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 |
@@ -30,6 +30,7 @@ import org.chromium.chrome.browser.preferences.ManagedPreferencesUtils; |
import org.chromium.chrome.browser.preferences.PrefServiceBridge; |
import org.chromium.chrome.browser.share.ShareHelper; |
import org.chromium.chrome.browser.tab.Tab; |
+import org.chromium.chrome.browser.util.FeatureUtilities; |
import org.chromium.components.dom_distiller.core.DomDistillerUrlUtils; |
import org.chromium.ui.base.DeviceFormFactor; |
import org.chromium.webapk.lib.client.WebApkValidator; |
@@ -202,6 +203,12 @@ public class AppMenuPropertiesDelegate { |
} |
} |
+ if (FeatureUtilities.isChromeHomeEnabled()) { |
mdjones
2017/03/14 20:08:36
Can you make sure this works in custom tabs?
Theresa
2017/03/14 20:40:02
None of these menu items are shown in custom tabs
|
+ menu.findItem(R.id.open_history_menu_id).setVisible(false); |
+ menu.findItem(R.id.downloads_menu_id).setVisible(false); |
+ menu.findItem(R.id.all_bookmarks_menu_id).setVisible(false); |
+ } |
+ |
// 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 |