OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 package org.chromium.android_webview; | 5 package org.chromium.android_webview; |
6 | 6 |
7 import android.content.pm.ActivityInfo; | 7 import android.content.pm.ActivityInfo; |
8 import android.graphics.Bitmap; | 8 import android.graphics.Bitmap; |
9 import android.graphics.Picture; | 9 import android.graphics.Picture; |
10 import android.net.http.SslError; | 10 import android.net.http.SslError; |
11 import android.os.Looper; | 11 import android.os.Looper; |
12 import android.os.Message; | 12 import android.os.Message; |
| 13 import android.util.ArrayMap; |
13 import android.view.KeyEvent; | 14 import android.view.KeyEvent; |
14 import android.view.View; | 15 import android.view.View; |
15 import android.webkit.ConsoleMessage; | 16 import android.webkit.ConsoleMessage; |
16 import android.webkit.GeolocationPermissions; | 17 import android.webkit.GeolocationPermissions; |
17 import android.webkit.ValueCallback; | 18 import android.webkit.ValueCallback; |
18 import android.webkit.WebChromeClient; | 19 import android.webkit.WebChromeClient; |
19 | 20 |
20 import org.chromium.android_webview.permission.AwPermissionRequest; | 21 import org.chromium.android_webview.permission.AwPermissionRequest; |
21 import org.chromium.content.browser.ContentViewCore; | 22 import org.chromium.content.browser.ContentViewCore; |
22 import org.chromium.content.browser.WebContentsObserverAndroid; | 23 import org.chromium.content.browser.WebContentsObserverAndroid; |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
141 * Parameters for the {@link AwContentsClient#showFileChooser} method. | 142 * Parameters for the {@link AwContentsClient#showFileChooser} method. |
142 */ | 143 */ |
143 public static class FileChooserParams { | 144 public static class FileChooserParams { |
144 public int mode; | 145 public int mode; |
145 public String acceptTypes; | 146 public String acceptTypes; |
146 public String title; | 147 public String title; |
147 public String defaultFilename; | 148 public String defaultFilename; |
148 public boolean capture; | 149 public boolean capture; |
149 } | 150 } |
150 | 151 |
| 152 /** |
| 153 * Parameters for the {@link AwContentsClient#shouldInterceptRequest} method
. |
| 154 */ |
| 155 public static class ShouldInterceptRequestParams { |
| 156 // Url of the request. |
| 157 public String url; |
| 158 // Is this for the main frame or a child iframe? |
| 159 public boolean isMainFrame; |
| 160 // Was a gesture associated with the request? Don't trust can easily be
spoofed. |
| 161 public boolean hasUserGesture; |
| 162 // Method used (GET/POST/OPTIONS) |
| 163 public String method; |
| 164 // Headers that would have been sent to server. |
| 165 public ArrayMap<String, String> requestHeaders; |
| 166 } |
| 167 |
151 public abstract void getVisitedHistory(ValueCallback<String[]> callback); | 168 public abstract void getVisitedHistory(ValueCallback<String[]> callback); |
152 | 169 |
153 public abstract void doUpdateVisitedHistory(String url, boolean isReload); | 170 public abstract void doUpdateVisitedHistory(String url, boolean isReload); |
154 | 171 |
155 public abstract void onProgressChanged(int progress); | 172 public abstract void onProgressChanged(int progress); |
156 | 173 |
157 public abstract InterceptedRequestData shouldInterceptRequest(String url); | 174 public abstract AwWebResourceResponse shouldInterceptRequest( |
| 175 ShouldInterceptRequestParams params); |
158 | 176 |
159 public abstract boolean shouldOverrideKeyEvent(KeyEvent event); | 177 public abstract boolean shouldOverrideKeyEvent(KeyEvent event); |
160 | 178 |
161 public abstract boolean shouldOverrideUrlLoading(String url); | 179 public abstract boolean shouldOverrideUrlLoading(String url); |
162 | 180 |
163 public abstract void onLoadResource(String url); | 181 public abstract void onLoadResource(String url); |
164 | 182 |
165 public abstract void onUnhandledKeyEvent(KeyEvent event); | 183 public abstract void onUnhandledKeyEvent(KeyEvent event); |
166 | 184 |
167 public abstract boolean onConsoleMessage(ConsoleMessage consoleMessage); | 185 public abstract boolean onConsoleMessage(ConsoleMessage consoleMessage); |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
255 public abstract void onFindResultReceived(int activeMatchOrdinal, int number
OfMatches, | 273 public abstract void onFindResultReceived(int activeMatchOrdinal, int number
OfMatches, |
256 boolean isDoneCounting); | 274 boolean isDoneCounting); |
257 | 275 |
258 /** | 276 /** |
259 * Called whenever there is a new content picture available. | 277 * Called whenever there is a new content picture available. |
260 * @param picture New picture. | 278 * @param picture New picture. |
261 */ | 279 */ |
262 public abstract void onNewPicture(Picture picture); | 280 public abstract void onNewPicture(Picture picture); |
263 | 281 |
264 } | 282 } |
OLD | NEW |