| 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.annotation.SuppressLint; | 7 import android.annotation.SuppressLint; |
| 8 import android.app.Activity; | 8 import android.app.Activity; |
| 9 import android.content.ComponentCallbacks2; | 9 import android.content.ComponentCallbacks2; |
| 10 import android.content.Context; | 10 import android.content.Context; |
| (...skipping 2276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2287 */ | 2287 */ |
| 2288 public void insertVisualStateCallback(long requestId, VisualStateCallback ca
llback) { | 2288 public void insertVisualStateCallback(long requestId, VisualStateCallback ca
llback) { |
| 2289 if (TRACE) Log.d(TAG, "insertVisualStateCallback"); | 2289 if (TRACE) Log.d(TAG, "insertVisualStateCallback"); |
| 2290 if (isDestroyed()) throw new IllegalStateException( | 2290 if (isDestroyed()) throw new IllegalStateException( |
| 2291 "insertVisualStateCallback cannot be called after the WebView ha
s been destroyed"); | 2291 "insertVisualStateCallback cannot be called after the WebView ha
s been destroyed"); |
| 2292 nativeInsertVisualStateCallback(mNativeAwContents, requestId, callback); | 2292 nativeInsertVisualStateCallback(mNativeAwContents, requestId, callback); |
| 2293 } | 2293 } |
| 2294 | 2294 |
| 2295 public boolean getDidAttemptLoad() { | 2295 public boolean getDidAttemptLoad() { |
| 2296 if (mDidAttemptLoad) return mDidAttemptLoad; | 2296 if (mDidAttemptLoad) return mDidAttemptLoad; |
| 2297 mDidAttemptLoad = mWebContentsObserver.hasStartedAnyProvisionalLoad(); | 2297 mDidAttemptLoad = mWebContentsObserver.hasStartedNonApiProvisionalLoadIn
MainFrame(); |
| 2298 return mDidAttemptLoad; | 2298 return mDidAttemptLoad; |
| 2299 } | 2299 } |
| 2300 | 2300 |
| 2301 //--------------------------------------------------------------------------
------------------ | 2301 //--------------------------------------------------------------------------
------------------ |
| 2302 // Methods called from native via JNI | 2302 // Methods called from native via JNI |
| 2303 //--------------------------------------------------------------------------
------------------ | 2303 //--------------------------------------------------------------------------
------------------ |
| 2304 | 2304 |
| 2305 @CalledByNative | 2305 @CalledByNative |
| 2306 private static void onDocumentHasImagesResponse(boolean result, Message mess
age) { | 2306 private static void onDocumentHasImagesResponse(boolean result, Message mess
age) { |
| 2307 message.arg1 = result ? 1 : 0; | 2307 message.arg1 = result ? 1 : 0; |
| (...skipping 685 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2993 private native void nativeCreatePdfExporter(long nativeAwContents, AwPdfExpo
rter awPdfExporter); | 2993 private native void nativeCreatePdfExporter(long nativeAwContents, AwPdfExpo
rter awPdfExporter); |
| 2994 | 2994 |
| 2995 private native void nativePreauthorizePermission(long nativeAwContents, Stri
ng origin, | 2995 private native void nativePreauthorizePermission(long nativeAwContents, Stri
ng origin, |
| 2996 long resources); | 2996 long resources); |
| 2997 | 2997 |
| 2998 private native void nativePostMessageToFrame(long nativeAwContents, String f
rameId, | 2998 private native void nativePostMessageToFrame(long nativeAwContents, String f
rameId, |
| 2999 String message, String targetOrigin, int[] msgPorts); | 2999 String message, String targetOrigin, int[] msgPorts); |
| 3000 | 3000 |
| 3001 private native void nativeCreateMessageChannel(long nativeAwContents, AwMess
agePort[] ports); | 3001 private native void nativeCreateMessageChannel(long nativeAwContents, AwMess
agePort[] ports); |
| 3002 } | 3002 } |
| OLD | NEW |