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

Unified Diff: customtabs/src/android/support/customtabs/CustomTabsClient.java

Issue 2438103002: Add postMessage APIs to the support lib (Closed)
Patch Set: Overridden callback in CustomTabsSessionToken Created 4 years, 2 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: customtabs/src/android/support/customtabs/CustomTabsClient.java
diff --git a/customtabs/src/android/support/customtabs/CustomTabsClient.java b/customtabs/src/android/support/customtabs/CustomTabsClient.java
index f743c7dde92ee3f73648368dc239181506af09e7..8b742a2fd6e8340191c9d3781b601dc09f52a8a0 100644
--- a/customtabs/src/android/support/customtabs/CustomTabsClient.java
+++ b/customtabs/src/android/support/customtabs/CustomTabsClient.java
@@ -175,7 +175,7 @@ public class CustomTabsClient {
* @param callback The callback through which the client will receive updates about the created
* session. Can be null.
* @return The session object that was created as a result of the transaction. The client can
- * use this to relay {@link CustomTabsSession#mayLaunchUrl(Uri, Bundle, List)} calls.
+ * use this to relay session specific calls.
* Null on error.
*/
public CustomTabsSession newSession(final CustomTabsCallback callback) {
@@ -186,6 +186,16 @@ public class CustomTabsClient {
}
@Override
+ public void onMessageChannelReady(Uri origin, Bundle extras) {
+ if (callback != null) callback.onMessageChannelReady(origin, extras);
+ }
+
+ @Override
+ public void onPostMessage(String message, Bundle extras) {
+ if (callback != null) callback.onPostMessage(message, extras);
+ }
+
+ @Override
public void extraCallback(String callbackName, Bundle args) throws RemoteException {
if (callback != null) callback.extraCallback(callbackName, args);
}

Powered by Google App Engine
This is Rietveld 408576698