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

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

Issue 1568813002: Let clients update icons for buttons on bottombar through service (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@bottom_bar
Patch Set: tag->id Created 4 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
« no previous file with comments | « chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabIntentDataProvider.java ('k') | no next file » | 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/customtabs/CustomTabsConnection.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabsConnection.java b/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabsConnection.java
index 66bafe3ec7dcdcdffef4120e2955ebb449266f21..5fcec5db02908136a8cb2c31b35643c0db31b090 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabsConnection.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabsConnection.java
@@ -383,11 +383,11 @@ public class CustomTabsConnection extends ICustomTabsService.Stub {
@Override
public boolean updateVisuals(final ICustomTabsCallback callback, Bundle bundle) {
- // TODO(ianwen): add update logic here to support bundle list and bottom bar items.
final Bundle actionButtonBundle = IntentUtils.safeGetBundle(bundle,
CustomTabsIntent.EXTRA_ACTION_BUTTON_BUNDLE);
if (actionButtonBundle == null) return false;
-
+ final int id = actionButtonBundle.getInt(CustomTabsIntent.KEY_ID,
+ CustomTabsIntent.TOOLBAR_ACTION_BUTTON_ID);
final Bitmap bitmap = CustomButtonParams.parseBitmapFromBundle(actionButtonBundle);
final String description = CustomButtonParams
.parseDescriptionFromBundle(actionButtonBundle);
@@ -397,7 +397,7 @@ public class CustomTabsConnection extends ICustomTabsService.Stub {
return ThreadUtils.runOnUiThreadBlocking(new Callable<Boolean>() {
@Override
public Boolean call() throws Exception {
- return CustomTabActivity.updateCustomButton(callback.asBinder(), 0, bitmap,
+ return CustomTabActivity.updateCustomButton(callback.asBinder(), id, bitmap,
description);
}
});
« no previous file with comments | « chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabIntentDataProvider.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698