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

Side by Side Diff: android_webview/java/src/org/chromium/android_webview/AwContents.java

Issue 1024103002: [Android WebView] Provide user-initiated provisional load detection (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Comments and build fix Created 5 years, 9 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 unified diff | Download patch
« no previous file with comments | « no previous file | android_webview/java/src/org/chromium/android_webview/AwWebContentsObserver.java » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « no previous file | android_webview/java/src/org/chromium/android_webview/AwWebContentsObserver.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698