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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/ChromeActivity.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/ChromeActivity.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ChromeActivity.java b/chrome/android/java/src/org/chromium/chrome/browser/ChromeActivity.java
index 28b4f8608ba8fab876a7793c2b7c6d7280369c39..9e0d6bcbb052703100b12290e05255718cbceb74 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/ChromeActivity.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/ChromeActivity.java
@@ -901,14 +901,12 @@ public abstract class ChromeActivity extends AsyncInitializationActivity
/**
* Triggered when the share menu item is selected.
* This creates and shows a share intent picker dialog or starts a share intent directly.
- *
- * @param currentTab The {@link Tab} a user is watching.
* @param shareDirectly Whether it should share directly with the activity that was most
* recently used to share.
* @param isIncognito Whether currentTab is incognito.
*/
- public void onShareMenuItemSelected(final Tab currentTab,
- final boolean shareDirectly, boolean isIncognito) {
+ public void onShareMenuItemSelected(final boolean shareDirectly, boolean isIncognito) {
+ final Tab currentTab = getActivityTab();
if (currentTab == null) return;
final Activity mainActivity = this;
@@ -1415,7 +1413,7 @@ public abstract class ChromeActivity extends AsyncInitializationActivity
RecordUserAction.record("MobileMenuHistory");
StartupMetrics.getInstance().recordOpenedHistory();
} else if (id == R.id.share_menu_id || id == R.id.direct_share_menu_id) {
- onShareMenuItemSelected(currentTab, id == R.id.direct_share_menu_id,
+ onShareMenuItemSelected(id == R.id.direct_share_menu_id,
getCurrentTabModel().isIncognito());
} else if (id == R.id.print_id) {
PrintingController printingController = getChromeApplication().getPrintingController();

Powered by Google App Engine
This is Rietveld 408576698