diff options
| author | Tao Bai <michaelbai@google.com> | 2014-03-28 22:06:00 -0700 |
|---|---|---|
| committer | Tao Bai <michaelbai@google.com> | 2014-04-10 20:48:41 -0700 |
| commit | 672b99c8f80177784053074d178fdea6750e82df (patch) | |
| tree | 87f47fd187a436e4fd11f71d67f634b51778bb52 /core/java/android/webkit/WebChromeClient.java | |
| parent | 2adb64c96671bf39bfa74c5416f117afd13f4091 (diff) | |
Define new general permission APIs for webview.
This will give us ability to add new webview featrues which requires permission without changing API during the WebView autoupdate.
Also deprecated geolocation permission related APIs.
BUG: 13699047
Change-Id: I6a557e11eb26c6ca236d44e75600e0b265fd791c
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 aa57423a09eb..60cba869d658 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 |
