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

Unified Diff: ui/android/java/src/org/chromium/ui/base/ActivityWindowAndroid.java

Issue 1902903003: Receive intent callbacks without launching intents (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 | « no previous file | ui/android/java/src/org/chromium/ui/base/WindowAndroid.java » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/android/java/src/org/chromium/ui/base/ActivityWindowAndroid.java
diff --git a/ui/android/java/src/org/chromium/ui/base/ActivityWindowAndroid.java b/ui/android/java/src/org/chromium/ui/base/ActivityWindowAndroid.java
index ddc2ddd462a8639f31e878f2510b78c145363dfa..2c5948ed3ab802f5754452b5be43cf93d37e01e6 100644
--- a/ui/android/java/src/org/chromium/ui/base/ActivityWindowAndroid.java
+++ b/ui/android/java/src/org/chromium/ui/base/ActivityWindowAndroid.java
@@ -130,6 +130,17 @@ public class ActivityWindowAndroid
}
@Override
+ public int addIntentCallback(IntentCallback callback, Integer errorId) {
Ted C 2016/04/19 21:30:24 I'd be tempted to do something more like this: pu
+ Activity activity = getActivity().get();
+ if (activity == null) return START_INTENT_FAILURE;
+
+ int requestCode = generateNextRequestCode();
+
+ storeCallbackData(requestCode, callback, errorId);
+ return requestCode;
+ }
+
+ @Override
public void cancelIntent(int requestCode) {
Activity activity = getActivity().get();
if (activity == null) return;
« no previous file with comments | « no previous file | ui/android/java/src/org/chromium/ui/base/WindowAndroid.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698