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

Unified Diff: Application/src/main/java/org/chromium/customtabsclient/BrowserActionsReceiver.java

Issue 2961203002: Support library changes to allow a callback notifying the selection of default items for Browser Ac… (Closed)
Patch Set: Update based on Yusuf's comments and add new API. Created 3 years, 6 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: Application/src/main/java/org/chromium/customtabsclient/BrowserActionsReceiver.java
diff --git a/Application/src/main/java/org/chromium/customtabsclient/BrowserActionsReceiver.java b/Application/src/main/java/org/chromium/customtabsclient/BrowserActionsReceiver.java
new file mode 100644
index 0000000000000000000000000000000000000000..bd4f5bf3e7317e578b2acb28851713d429840dd2
--- /dev/null
+++ b/Application/src/main/java/org/chromium/customtabsclient/BrowserActionsReceiver.java
@@ -0,0 +1,17 @@
+package org.chromium.customtabsclient;
Yusuf 2017/07/07 21:36:35 copyright missing
ltian 2017/07/10 18:45:55 Done.
+
+import android.content.BroadcastReceiver;
+import android.content.Context;
+import android.content.Intent;
+import android.widget.Toast;
+
+/**
+ * A {@link BroadcastReceiver} that handles the callback if default menu items are chosen from Browser Actions.
+ */
+public class BrowserActionsReceiver extends BroadcastReceiver {
+ @Override
+ public void onReceive(Context context, Intent intent) {
+ String toastMsg = "Chosen item Id: " + intent.getDataString();
+ Toast.makeText(context, toastMsg, Toast.LENGTH_SHORT).show();
+ }
+}

Powered by Google App Engine
This is Rietveld 408576698