Chromium Code Reviews| 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 84a34990d35a0c5df5375c3de7a071557f31fdac..b9d4429ddf5fa6ebd6fe2ff4f3cb8685cd9c39bd 100644 |
| --- a/ui/android/java/src/org/chromium/ui/base/WindowAndroid.java |
| +++ b/ui/android/java/src/org/chromium/ui/base/WindowAndroid.java |
| @@ -214,6 +214,15 @@ public class WindowAndroid { |
| } |
| /** |
| + * Requests the specified permissions are granted for further use. |
| + * @param permissions The list of permissions to request access to. |
| + * @param callback The callback to be notified whether the permissions were granted. |
| + */ |
| + public void requestPermissions(String[] permissions, PermissionCallback callback) { |
| + Log.d(TAG, "Can not request permissions as the context is not an Activity"); |
|
gone
2015/06/04 18:42:04
*cannot
Ted C
2015/06/05 00:57:57
Done.
|
| + } |
| + |
| + /** |
| * Displays an error message with a provided error message string. |
| * @param error The error message string to be displayed. |
| */ |
| @@ -305,17 +314,6 @@ public class WindowAndroid { |
| nativeOnActivityResumed(mNativeWindowAndroid); |
| } |
| - /** |
| - * Responds to the intent result if the intent was created by the native window. |
| - * @param requestCode Request code of the requested intent. |
| - * @param resultCode Result code of the requested intent. |
| - * @param data The data returned by the intent. |
| - * @return Boolean value of whether the intent was started by the native window. |
| - */ |
| - public boolean onActivityResult(int requestCode, int resultCode, Intent data) { |
| - return false; |
| - } |
| - |
| @CalledByNative |
| private void requestVSyncUpdate() { |
| mVSyncMonitor.requestUpdate(); |
| @@ -337,6 +335,23 @@ public class WindowAndroid { |
| } |
| /** |
| + * Callback for permission requests. |
| + */ |
| + public interface PermissionCallback { |
| + /** |
| + * Called upon completing a permission request. |
| + * @param permissions The list of permissions in the result. |
| + * @param grantResults Whether the permissions were granted. |
| + */ |
| + void onRequestPermissionsResult(String[] permissions, int[] grantResults); |
| + |
| + /** |
| + * Called when a permission request has been aborted. |
| + */ |
| + void onRequestPermissionAborted(); |
| + } |
| + |
| + /** |
| * Tests that an activity is available to handle the passed in intent. |
| * @param intent The intent to check. |
| * @return True if an activity is available to process this intent when started, meaning that |