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

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

Issue 1509713004: Add a default share button to the menu of Custom Tabs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years 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/CustomTabActivity.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabActivity.java b/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabActivity.java
index ecd2e585638e57aa49d9d8a7834433a7db6341db..6081c641843cbc12f3a4cbda3617054b59c727a5 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabActivity.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabActivity.java
@@ -366,7 +366,8 @@ public class CustomTabActivity extends ChromeActivity {
@Override
protected AppMenuPropertiesDelegate createAppMenuPropertiesDelegate() {
- return new CustomTabAppMenuPropertiesDelegate(this, mIntentDataProvider.getMenuTitles());
+ return new CustomTabAppMenuPropertiesDelegate(this, mIntentDataProvider.getMenuTitles(),
+ mIntentDataProvider.shouldShowShareMenuItem());
}
@Override
@@ -453,7 +454,7 @@ public class CustomTabActivity extends ChromeActivity {
public boolean onOptionsItemSelected(MenuItem item) {
int menuIndex = getAppMenuPropertiesDelegate().getIndexOfMenuItem(item);
if (menuIndex >= 0) {
- mIntentDataProvider.clickMenuItemWithUrl(getApplicationContext(), menuIndex,
+ mIntentDataProvider.clickMenuItemWithUrl(this, menuIndex,
getTabModelSelector().getCurrentTab().getUrl());
RecordUserAction.record("CustomTabsMenuCustomMenuItem");
return true;

Powered by Google App Engine
This is Rietveld 408576698