OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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.graphics.Bitmap; | 7 import android.graphics.Bitmap; |
8 import android.net.http.SslCertificate; | 8 import android.net.http.SslCertificate; |
9 import android.os.AsyncTask; | 9 import android.os.AsyncTask; |
10 import android.os.Message; | 10 import android.os.Message; |
11 import android.text.TextUtils; | 11 import android.text.TextUtils; |
12 import android.util.Log; | 12 import android.util.Log; |
13 import android.view.ViewGroup; | 13 import android.view.ViewGroup; |
14 import android.webkit.ValueCallback; | 14 import android.webkit.ValueCallback; |
15 | 15 |
16 import org.chromium.base.CalledByNative; | 16 import org.chromium.base.CalledByNative; |
17 import org.chromium.base.JNINamespace; | 17 import org.chromium.base.JNINamespace; |
18 import org.chromium.base.ThreadUtils; | 18 import org.chromium.base.ThreadUtils; |
19 import org.chromium.chrome.browser.component.navigation_interception.InterceptNa
vigationDelegate; | 19 import org.chromium.chrome.browser.component.navigation_interception.InterceptNa
vigationDelegate; |
20 import org.chromium.content.browser.ContentViewCore; | 20 import org.chromium.content.browser.ContentViewCore; |
| 21 import org.chromium.content.browser.LoadUrlParams; |
21 import org.chromium.content.browser.NavigationHistory; | 22 import org.chromium.content.browser.NavigationHistory; |
22 import org.chromium.content.common.CleanupReference; | 23 import org.chromium.content.common.CleanupReference; |
23 import org.chromium.net.X509Util; | 24 import org.chromium.net.X509Util; |
24 import org.chromium.ui.gfx.NativeWindow; | 25 import org.chromium.ui.gfx.NativeWindow; |
25 | 26 |
26 import java.io.File; | 27 import java.io.File; |
27 import java.net.MalformedURLException; | 28 import java.net.MalformedURLException; |
28 import java.net.URL; | 29 import java.net.URL; |
29 import java.security.KeyStoreException; | 30 import java.security.KeyStoreException; |
30 import java.security.NoSuchAlgorithmException; | 31 import java.security.NoSuchAlgorithmException; |
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
178 public int getMostRecentProgress() { | 179 public int getMostRecentProgress() { |
179 // WebContentsDelegateAndroid conveniently caches the most recent notifi
ed value for us. | 180 // WebContentsDelegateAndroid conveniently caches the most recent notifi
ed value for us. |
180 return mContentsClient.getWebContentsDelegate().getMostRecentProgress(); | 181 return mContentsClient.getWebContentsDelegate().getMostRecentProgress(); |
181 } | 182 } |
182 | 183 |
183 public Bitmap getFavicon() { | 184 public Bitmap getFavicon() { |
184 // To be implemented. | 185 // To be implemented. |
185 return null; | 186 return null; |
186 } | 187 } |
187 | 188 |
| 189 /** |
| 190 * Load url without fixing up the url string. Consumers of ContentView are r
esponsible for |
| 191 * ensuring the URL passed in is properly formatted (i.e. the scheme has bee
n added if left |
| 192 * off during user input). |
| 193 * |
| 194 * @param pararms Parameters for this load. |
| 195 */ |
| 196 public void loadUrl(LoadUrlParams params) { |
| 197 mContentViewCore.loadUrl(params); |
| 198 } |
| 199 |
188 //--------------------------------------------------------------------------
------------------ | 200 //--------------------------------------------------------------------------
------------------ |
189 // WebView[Provider] method implementations (where not provided by ContentV
iewCore) | 201 // WebView[Provider] method implementations (where not provided by ContentV
iewCore) |
190 //--------------------------------------------------------------------------
------------------ | 202 //--------------------------------------------------------------------------
------------------ |
191 | 203 |
192 /** | 204 /** |
193 * Clears the resource cache. Note that the cache is per-application, so thi
s will clear the | 205 * Clears the resource cache. Note that the cache is per-application, so thi
s will clear the |
194 * cache for all WebViews used. | 206 * cache for all WebViews used. |
195 * | 207 * |
196 * @param includeDiskFiles if false, only the RAM cache is cleared | 208 * @param includeDiskFiles if false, only the RAM cache is cleared |
197 */ | 209 */ |
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
393 private native void nativeSetInterceptNavigationDelegate(int nativeAwContent
s, | 405 private native void nativeSetInterceptNavigationDelegate(int nativeAwContent
s, |
394 InterceptNavigationDelegate navigationInterceptionDelegate); | 406 InterceptNavigationDelegate navigationInterceptionDelegate); |
395 | 407 |
396 private native int nativeFindAllSync(int nativeAwContents, String searchStri
ng); | 408 private native int nativeFindAllSync(int nativeAwContents, String searchStri
ng); |
397 private native void nativeFindAllAsync(int nativeAwContents, String searchSt
ring); | 409 private native void nativeFindAllAsync(int nativeAwContents, String searchSt
ring); |
398 private native void nativeFindNext(int nativeAwContents, boolean forward); | 410 private native void nativeFindNext(int nativeAwContents, boolean forward); |
399 private native void nativeClearMatches(int nativeAwContents); | 411 private native void nativeClearMatches(int nativeAwContents); |
400 private native void nativeClearCache(int nativeAwContents, boolean includeDi
skFiles); | 412 private native void nativeClearCache(int nativeAwContents, boolean includeDi
skFiles); |
401 private native byte[] nativeGetCertificate(int nativeAwContents); | 413 private native byte[] nativeGetCertificate(int nativeAwContents); |
402 } | 414 } |
OLD | NEW |