| 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 abd7b4bfcfa279145b31914c0b727db23d8d8098..1578cab156bea51da763869908ce6474c520f35d 100644
|
| --- a/ui/android/java/src/org/chromium/ui/base/WindowAndroid.java
|
| +++ b/ui/android/java/src/org/chromium/ui/base/WindowAndroid.java
|
| @@ -185,7 +185,7 @@ public class WindowAndroid {
|
| * Shows an intent and returns the results to the callback object.
|
| * @param intent The PendingIntent that needs to be shown.
|
| * @param callback The object that will receive the results for the intent.
|
| - * @param errorId The ID of error string to be show if activity is paused before intent
|
| + * @param errorId The ID of error string to be shown if activity is paused before intent
|
| * results, or null if no message is required.
|
| * @return Whether the intent was shown.
|
| */
|
| @@ -197,7 +197,7 @@ public class WindowAndroid {
|
| * Shows an intent and returns the results to the callback object.
|
| * @param intent The intent that needs to be shown.
|
| * @param callback The object that will receive the results for the intent.
|
| - * @param errorId The ID of error string to be show if activity is paused before intent
|
| + * @param errorId The ID of error string to be shown if activity is paused before intent
|
| * results, or null if no message is required.
|
| * @return Whether the intent was shown.
|
| */
|
| @@ -209,7 +209,7 @@ public class WindowAndroid {
|
| * Shows an intent that could be canceled and returns the results to the callback object.
|
| * @param intent The PendingIntent that needs to be shown.
|
| * @param callback The object that will receive the results for the intent.
|
| - * @param errorId The ID of error string to be show if activity is paused before intent
|
| + * @param errorId The ID of error string to be shown if activity is paused before intent
|
| * results, or null if no message is required.
|
| * @return A non-negative request code that could be used for finishActivity, or
|
| * START_INTENT_FAILURE if failed.
|
| @@ -224,7 +224,7 @@ public class WindowAndroid {
|
| * Shows an intent that could be canceled and returns the results to the callback object.
|
| * @param intent The intent that needs to be showed.
|
| * @param callback The object that will receive the results for the intent.
|
| - * @param errorId The ID of error string to be show if activity is paused before intent
|
| + * @param errorId The ID of error string to be shown if activity is paused before intent
|
| * results, or null if no message is required.
|
| * @return A non-negative request code that could be used for finishActivity, or
|
| * START_INTENT_FAILURE if failed.
|
| @@ -235,6 +235,19 @@ public class WindowAndroid {
|
| }
|
|
|
| /**
|
| + * Adds the intent callback and returns the request code that can be used to start the intent.
|
| + * @param callback The object that will receive the results from the intent.
|
| + * @param errorId The ID of error string to be shown if activity is paused before intent
|
| + * results, or null if no message is required.
|
| + * @return A non-negative request code that could be used for starting an intent, or
|
| + * START_INTENT_FAILURE if failed.
|
| + */
|
| + public int addIntentCallback(IntentCallback callback, Integer errorId) {
|
| + Log.d(TAG, "Can't set intent callback as context is not an Activity");
|
| + return START_INTENT_FAILURE;
|
| + }
|
| +
|
| + /**
|
| * Force finish another activity that you had previously started with showCancelableIntent.
|
| * @param requestCode The request code returned from showCancelableIntent.
|
| */
|
|
|