Index: ui/android/java/src/org/chromium/ui/base/WindowAndroid.java |
diff --git a/ui/android/java/src/org/chromium/ui/base/WindowAndroid.java b/ui/android/java/src/org/chromium/ui/base/WindowAndroid.java |
index 3c4827241de79de48caa6b75e3d0829d7e9d1a67..c526cd9c3a3c0d9c4eb96725b6fbc084b5ce5d6d 100644 |
--- a/ui/android/java/src/org/chromium/ui/base/WindowAndroid.java |
+++ b/ui/android/java/src/org/chromium/ui/base/WindowAndroid.java |
@@ -58,6 +58,20 @@ public class WindowAndroid { |
} |
/** |
+ * Removes a callback from the list of pending intents, so that nothing happens if/when the |
+ * result for that intent is received. |
+ * @param callback The object that should have received the results |
+ * @return True if the callback was removed, false if it was not found. |
+ */ |
+ public boolean removeIntentCallback(IntentCallback callback) { |
David Trainor- moved to gerrit
2013/11/19 23:27:39
Is this meant to cancel the action? If not, shoul
Jay Civelli
2013/11/20 00:46:40
You mean removing the callback from mOutstandingIn
|
+ int requestCode = mOutstandingIntents.indexOfValue(callback); |
+ if (requestCode < 0) return false; |
+ mOutstandingIntents.remove(requestCode); |
+ mIntentErrors.remove(requestCode); |
+ return true; |
+ } |
+ |
+ /** |
* Displays an error message with a provided error message string. |
* @param error The error message string to be displayed. |
*/ |