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; | |
22 import org.chromium.content.browser.NavigationHistory; | 21 import org.chromium.content.browser.NavigationHistory; |
23 import org.chromium.content.common.CleanupReference; | 22 import org.chromium.content.common.CleanupReference; |
24 import org.chromium.net.X509Util; | 23 import org.chromium.net.X509Util; |
25 import org.chromium.ui.gfx.NativeWindow; | 24 import org.chromium.ui.gfx.NativeWindow; |
26 | 25 |
27 import java.io.File; | 26 import java.io.File; |
28 import java.net.MalformedURLException; | 27 import java.net.MalformedURLException; |
29 import java.net.URL; | 28 import java.net.URL; |
30 import java.security.KeyStoreException; | 29 import java.security.KeyStoreException; |
31 import java.security.NoSuchAlgorithmException; | 30 import java.security.NoSuchAlgorithmException; |
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
167 public int getMostRecentProgress() { | 166 public int getMostRecentProgress() { |
168 // WebContentsDelegateAndroid conveniently caches the most recent notifi
ed value for us. | 167 // WebContentsDelegateAndroid conveniently caches the most recent notifi
ed value for us. |
169 return mContentsClient.getWebContentsDelegate().getMostRecentProgress(); | 168 return mContentsClient.getWebContentsDelegate().getMostRecentProgress(); |
170 } | 169 } |
171 | 170 |
172 public Bitmap getFavicon() { | 171 public Bitmap getFavicon() { |
173 // To be implemented. | 172 // To be implemented. |
174 return null; | 173 return null; |
175 } | 174 } |
176 | 175 |
177 /** | |
178 * Load url without fixing up the url string. Consumers of ContentView are r
esponsible for | |
179 * ensuring the URL passed in is properly formatted (i.e. the scheme has bee
n added if left | |
180 * off during user input). | |
181 * | |
182 * @param pararms Parameters for this load. | |
183 */ | |
184 public void loadUrl(LoadUrlParams params) { | |
185 mContentViewCore.loadUrl(params); | |
186 } | |
187 | |
188 //--------------------------------------------------------------------------
------------------ | 176 //--------------------------------------------------------------------------
------------------ |
189 // WebView[Provider] method implementations (where not provided by ContentV
iewCore) | 177 // WebView[Provider] method implementations (where not provided by ContentV
iewCore) |
190 //--------------------------------------------------------------------------
------------------ | 178 //--------------------------------------------------------------------------
------------------ |
191 | 179 |
192 /** | 180 /** |
193 * Clears the resource cache. Note that the cache is per-application, so thi
s will clear the | 181 * Clears the resource cache. Note that the cache is per-application, so thi
s will clear the |
194 * cache for all WebViews used. | 182 * cache for all WebViews used. |
195 * | 183 * |
196 * @param includeDiskFiles if false, only the RAM cache is cleared | 184 * @param includeDiskFiles if false, only the RAM cache is cleared |
197 */ | 185 */ |
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
393 private native void nativeSetInterceptNavigationDelegate(int nativeAwContent
s, | 381 private native void nativeSetInterceptNavigationDelegate(int nativeAwContent
s, |
394 InterceptNavigationDelegate navigationInterceptionDelegate); | 382 InterceptNavigationDelegate navigationInterceptionDelegate); |
395 | 383 |
396 private native int nativeFindAllSync(int nativeAwContents, String searchStri
ng); | 384 private native int nativeFindAllSync(int nativeAwContents, String searchStri
ng); |
397 private native void nativeFindAllAsync(int nativeAwContents, String searchSt
ring); | 385 private native void nativeFindAllAsync(int nativeAwContents, String searchSt
ring); |
398 private native void nativeFindNext(int nativeAwContents, boolean forward); | 386 private native void nativeFindNext(int nativeAwContents, boolean forward); |
399 private native void nativeClearMatches(int nativeAwContents); | 387 private native void nativeClearMatches(int nativeAwContents); |
400 private native void nativeClearCache(int nativeAwContents, boolean includeDi
skFiles); | 388 private native void nativeClearCache(int nativeAwContents, boolean includeDi
skFiles); |
401 private native byte[] nativeGetCertificate(int nativeAwContents); | 389 private native byte[] nativeGetCertificate(int nativeAwContents); |
402 } | 390 } |
OLD | NEW |