diff options
author | Tao Bai <michaelbai@google.com> | 2014-04-15 18:04:49 +0000 |
---|---|---|
committer | Tao Bai <michaelbai@google.com> | 2014-04-15 18:04:49 +0000 |
commit | 4c22b547761fad31755b76e2fb4fc2c369d61a46 (patch) | |
tree | 87f47fd187a436e4fd11f71d67f634b51778bb52 /core/java/android/webkit/WebChromeClient.java | |
parent | e0a7b08d369e323f524251a44251c902122a6414 (diff) | |
download | frameworks_base-4c22b547761fad31755b76e2fb4fc2c369d61a46.zip frameworks_base-4c22b547761fad31755b76e2fb4fc2c369d61a46.tar.gz frameworks_base-4c22b547761fad31755b76e2fb4fc2c369d61a46.tar.bz2 |
Revert "Revert "Define new general permission APIs for webview.""
This reverts commit e0a7b08d369e323f524251a44251c902122a6414.
Change-Id: Ieba5a72524e43eb5e2fccb39647fd11e9d9494c8
Diffstat (limited to 'core/java/android/webkit/WebChromeClient.java')
-rw-r--r-- | core/java/android/webkit/WebChromeClient.java | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/core/java/android/webkit/WebChromeClient.java b/core/java/android/webkit/WebChromeClient.java index aa57423..60cba86 100644 --- a/core/java/android/webkit/WebChromeClient.java +++ b/core/java/android/webkit/WebChromeClient.java @@ -296,6 +296,30 @@ public class WebChromeClient { public void onGeolocationPermissionsHidePrompt() {} /** + * Notify the host application that web content is requesting permission to + * access the specified resources and the permission currently isn't granted + * or denied. The host application must invoke {@link PermissionRequest#grant(long)} + * or {@link PermissionRequest#deny()}. + * + * If this method isn't overridden, the permission is denied. + * + * @param request the PermissionRequest from current web content. + * @hide + */ + public void onPermissionRequest(PermissionRequest request) { + request.deny(); + } + + /** + * Notify the host application that the given permission request + * has been canceled. Any related UI should therefore be hidden. + * + * @param request the PermissionRequest need be canceled. + * @hide + */ + public void onPermissionRequestCanceled(PermissionRequest request) {} + + /** * Tell the client that a JavaScript execution timeout has occured. And the * client may decide whether or not to interrupt the execution. If the * client returns true, the JavaScript will be interrupted. If the client |