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

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

Issue 284123004: [android_webview] Add more params to request intercepting. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix accidentally broken test Created 6 years, 6 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
Index: android_webview/java/src/org/chromium/android_webview/AwContentsClient.java
diff --git a/android_webview/java/src/org/chromium/android_webview/AwContentsClient.java b/android_webview/java/src/org/chromium/android_webview/AwContentsClient.java
index 4b952831af9dc785c9b728bd0585272fcd080078..5c41d62cfd5fc65e8a1a344f0ba6b72b471675c1 100644
--- a/android_webview/java/src/org/chromium/android_webview/AwContentsClient.java
+++ b/android_webview/java/src/org/chromium/android_webview/AwContentsClient.java
@@ -10,6 +10,7 @@ import android.graphics.Picture;
import android.net.http.SslError;
import android.os.Looper;
import android.os.Message;
+import android.util.ArrayMap;
import android.view.KeyEvent;
import android.view.View;
import android.webkit.ConsoleMessage;
@@ -148,13 +149,30 @@ public abstract class AwContentsClient {
public boolean capture;
}
+ /**
+ * Parameters for the {@link AwContentsClient#shouldInterceptRequest} method.
+ */
+ public static class ShouldInterceptRequestParams {
+ // Url of the request.
+ public String url;
+ // Is this for the main frame or a child iframe?
+ public boolean isMainFrame;
+ // Was a gesture associated with the request? Don't trust can easily be spoofed.
+ public boolean hasUserGesture;
+ // Method used (GET/POST/OPTIONS)
+ public String method;
+ // Headers that would have been sent to server.
+ public ArrayMap<String, String> requestHeaders;
+ }
+
public abstract void getVisitedHistory(ValueCallback<String[]> callback);
public abstract void doUpdateVisitedHistory(String url, boolean isReload);
public abstract void onProgressChanged(int progress);
- public abstract InterceptedRequestData shouldInterceptRequest(String url);
+ public abstract AwWebResourceResponse shouldInterceptRequest(
+ ShouldInterceptRequestParams params);
public abstract boolean shouldOverrideKeyEvent(KeyEvent event);

Powered by Google App Engine
This is Rietveld 408576698