| Index: customtabs/src/android/support/customtabs/CustomTabsCallback.java
|
| diff --git a/customtabs/src/android/support/customtabs/CustomTabsCallback.java b/customtabs/src/android/support/customtabs/CustomTabsCallback.java
|
| index d7fdd3988d23385b3009c85b0532ccb8418ecf4c..261fc870e30196ca2c9036eea9886210d359b04e 100644
|
| --- a/customtabs/src/android/support/customtabs/CustomTabsCallback.java
|
| +++ b/customtabs/src/android/support/customtabs/CustomTabsCallback.java
|
| @@ -16,10 +16,12 @@
|
|
|
| package android.support.customtabs;
|
|
|
| +import android.net.Uri;
|
| import android.os.Bundle;
|
|
|
| /**
|
| - * A callback class for custom tabs client to get messages regarding events in their custom tabs.
|
| + * A callback class for custom tabs client to get messages regarding events in their custom tabs. In
|
| + * the implementation, all callbacks are sent to the UI thread for the client.
|
| */
|
| public class CustomTabsCallback {
|
| /**
|
| @@ -62,6 +64,27 @@ public class CustomTabsCallback {
|
| public void onNavigationEvent(int navigationEvent, Bundle extras) {}
|
|
|
| /**
|
| + * Sent when {@link CustomTabsSession} has requested a postMessage channel through
|
| + * {@link CustomTabsService#validatePostMessageOrigin(CustomTabsSessionToken)} and the channel
|
| + * is ready for sending and receiving messages on both ends.
|
| + * @param origin The web origin that has been validated and will be used in all messages coming
|
| + * from this {@link CustomTabsSession}.
|
| + * @param extras Reserved for future use.
|
| + */
|
| + public synchronized void onMessageChannelReady(Uri origin, Bundle extras) {}
|
| +
|
| + /**
|
| + * Sent when a tab controlled by this {@link CustomTabsSession} has sent a postMessage message.
|
| + * If postMessage() is called from a single thread, then the messages will be posted in the same
|
| + * order. When received on the client side, it is the client's responsibility to preserve the
|
| + * ordering further.
|
| + *
|
| + * @param message The message sent.
|
| + * @param extras Reserved for future use.
|
| + */
|
| + public synchronized void onPostMessage(String message, Bundle extras) {}
|
| +
|
| + /**
|
| * Unsupported callbacks that may be provided by the implementation.
|
| *
|
| * <p>
|
|
|