Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1421)

Unified Diff: android_webview/java/src/org/chromium/android_webview/AwContents.java

Issue 274443002: Implement PreauthorizePermission (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: addressed comments Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | android_webview/native/aw_contents.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: android_webview/java/src/org/chromium/android_webview/AwContents.java
diff --git a/android_webview/java/src/org/chromium/android_webview/AwContents.java b/android_webview/java/src/org/chromium/android_webview/AwContents.java
index 762b4b6ed60e34cba8263eac6de7140f3e8b4440..4f142196134dec46b971edc1b5ebaaa9435115eb 100644
--- a/android_webview/java/src/org/chromium/android_webview/AwContents.java
+++ b/android_webview/java/src/org/chromium/android_webview/AwContents.java
@@ -15,6 +15,7 @@ import android.graphics.Color;
import android.graphics.Paint;
import android.graphics.Picture;
import android.graphics.Rect;
+import android.net.Uri;
import android.net.http.SslCertificate;
import android.os.AsyncTask;
import android.os.Build;
@@ -1497,6 +1498,14 @@ public class AwContents {
}
/**
+ * @see android.webkit.WebView#preauthorizePermission(Uri, long)
+ */
+ public void preauthorizePermission(Uri origin, long resources) {
+ if (mNativeAwContents == 0) return;
+ nativePreauthorizePermission(mNativeAwContents, origin.toString(), resources);
+ }
+
+ /**
* @see ContentViewCore.evaluateJavaScript(String, ContentViewCore.JavaScriptCallback)
*/
public void evaluateJavaScript(String script, final ValueCallback<String> callback) {
@@ -2134,4 +2143,7 @@ public class AwContents {
private native void nativeTrimMemory(long nativeAwContents, int level, boolean visible);
private native void nativeCreatePdfExporter(long nativeAwContents, AwPdfExporter awPdfExporter);
+
+ private native void nativePreauthorizePermission(long nativeAwContents, String origin,
+ long resources);
}
« no previous file with comments | « no previous file | android_webview/native/aw_contents.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698