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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabAppMenuPropertiesDelegate.java

Issue 2647593002: [Android] Add an option in CCT to disable star and download button (Closed)
Patch Set: nit Created 3 years, 11 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/customtabs/CustomTabAppMenuPropertiesDelegate.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabAppMenuPropertiesDelegate.java b/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabAppMenuPropertiesDelegate.java
index e264a259b7b17f605a34856c9d9ccd6b0c67a776..706fbcf880f9fd16845c2705fb03a0104baff589 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabAppMenuPropertiesDelegate.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabAppMenuPropertiesDelegate.java
@@ -35,6 +35,8 @@ public class CustomTabAppMenuPropertiesDelegate extends AppMenuPropertiesDelegat
private final boolean mShowShare;
private final boolean mIsMediaViewer;
+ private final boolean mShowStar;
+ private final boolean mShowDownload;
private final List<String> mMenuEntries;
private final Map<MenuItem, Integer> mItemToIndexMap = new HashMap<MenuItem, Integer>();
@@ -47,11 +49,13 @@ public class CustomTabAppMenuPropertiesDelegate extends AppMenuPropertiesDelegat
*/
public CustomTabAppMenuPropertiesDelegate(final ChromeActivity activity,
List<String> menuEntries, boolean showShare, final boolean isOpenedByChrome,
- final boolean isMediaViewer) {
+ final boolean isMediaViewer, boolean showStar, boolean showDownload) {
super(activity);
mMenuEntries = menuEntries;
mShowShare = showShare;
mIsMediaViewer = isMediaViewer;
+ mShowStar = showStar;
+ mShowDownload = showDownload;
mDefaultBrowserFetcher = new AsyncTask<Void, Void, String>() {
@Override
@@ -123,7 +127,8 @@ public class CustomTabAppMenuPropertiesDelegate extends AppMenuPropertiesDelegat
}
updateBookmarkMenuItem(bookmarkItem, currentTab);
}
-
+ bookmarkItem.setVisible(mShowStar);
+ downloadItem.setVisible(mShowDownload);
if (!FirstRunStatus.getFirstRunFlowComplete()) {
openInChromeItem.setVisible(false);
bookmarkItem.setVisible(false);

Powered by Google App Engine
This is Rietveld 408576698