Chromium Code Reviews

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/toolbar/ToolbarManager.java

Issue 1305253006: [Custom Tabs]Add API for updating action button as ContentProvider (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Index: chrome/android/java/src/org/chromium/chrome/browser/toolbar/ToolbarManager.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/toolbar/ToolbarManager.java b/chrome/android/java/src/org/chromium/chrome/browser/toolbar/ToolbarManager.java
index c79acbc0715371d6b38bd66f3da21e1ffa54eeb1..a2b4a032d1656511377af2979921443322359064 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/toolbar/ToolbarManager.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/toolbar/ToolbarManager.java
@@ -611,14 +611,15 @@ public class ToolbarManager implements ToolbarTabController, UrlFocusChangeListe
}
/**
- * Adds a custom action button to the {@link Toolbar} if it is supported.
- * @param drawable The {@link Drawable} to use as the background for the button.
- * @param description The content description for the custom action button.
- * @param listener The {@link OnClickListener} to use for clicks to the button.
+ * Sets/adds a custom action button to the {@link Toolbar} if it is supported. If there is
+ * already an action button, update the button instead.
+ * @param drawable The {@link Drawable} to use as the background for the button.
+ * @param description The content description for the custom action button.
+ * @param listener The {@link OnClickListener} to use for clicks to the button.
*/
- public void addCustomActionButton(Drawable drawable, String description,
+ public void setCustomActionButton(Drawable drawable, String description,
OnClickListener listener) {
- mToolbar.addCustomActionButton(drawable, description, listener);
+ mToolbar.setCustomActionButton(drawable, description, listener);
}
/**

Powered by Google App Engine