| Index: android_webview/java/src/org/chromium/android_webview/AwContents.java
|
| diff --git a/android_webview/java/src/org/chromium/android_webview/AwContents.java b/android_webview/java/src/org/chromium/android_webview/AwContents.java
|
| index 4568f1d02d92bb0fe2dc701556bb5f3fccfacecd..960580c1416bb68c88ef50329026ace4e6f42379 100644
|
| --- a/android_webview/java/src/org/chromium/android_webview/AwContents.java
|
| +++ b/android_webview/java/src/org/chromium/android_webview/AwContents.java
|
| @@ -183,17 +183,12 @@
|
|
|
| /**
|
| * Callback used when flushing the visual state, see {@link #flushVisualState}.
|
| - *
|
| - * <p>The {@code requestId} is the unique request id returned by
|
| - * {@link AwContents#flushVisualState} which can be used to match callbacks with requests.
|
| */
|
| @VisibleForTesting
|
| public abstract static class VisualStateFlushCallback {
|
| - public abstract void onComplete(long requestId);
|
| - public abstract void onFailure(long requestId);
|
| - }
|
| -
|
| - private static long sNextVisualStateRequestId = 1;
|
| + public abstract void onComplete();
|
| + public abstract void onFailure();
|
| + }
|
|
|
| private long mNativeAwContents;
|
| private final AwBrowserContext mBrowserContext;
|
| @@ -2054,14 +2049,9 @@
|
| * 1. The DOM tree is committed becoming the pending tree - see ThreadProxy::BeginMainFrame
|
| * 2. The pending tree is activated becoming the active tree
|
| * 3. A frame swap happens that draws the active tree into the screen
|
| - *
|
| - * @return an unique id that identifies this request. It can be used to match this request
|
| - * to the corresponding callback to allow reuse of {@link VisualStateFlushCallback} objects.
|
| - */
|
| - public long flushVisualState(VisualStateFlushCallback callback) {
|
| - long requestId = sNextVisualStateRequestId++;
|
| - nativeFlushVisualState(mNativeAwContents, callback, requestId);
|
| - return requestId;
|
| + */
|
| + public void flushVisualState(VisualStateFlushCallback callback) {
|
| + nativeFlushVisualState(mNativeAwContents, callback);
|
| }
|
|
|
| //--------------------------------------------------------------------------------------------
|
| @@ -2174,16 +2164,16 @@
|
| */
|
| @CalledByNative
|
| public void flushVisualStateCallback(
|
| - final VisualStateFlushCallback callback, final long requestId, final boolean result) {
|
| + final VisualStateFlushCallback callback, final boolean result) {
|
| // Posting avoids invoking the callback inside invoking_composite_
|
| // (see synchronous_compositor_impl.cc and crbug/452530).
|
| mContainerView.getHandler().post(new Runnable() {
|
| @Override
|
| public void run() {
|
| if (result) {
|
| - callback.onComplete(requestId);
|
| + callback.onComplete();
|
| } else {
|
| - callback.onFailure(requestId);
|
| + callback.onFailure();
|
| }
|
| }
|
| });
|
| @@ -2746,7 +2736,7 @@
|
| private native long nativeCapturePicture(long nativeAwContents, int width, int height);
|
| private native void nativeEnableOnNewPicture(long nativeAwContents, boolean enabled);
|
| private native void nativeFlushVisualState(
|
| - long nativeAwContents, VisualStateFlushCallback callback, long requestId);
|
| + long nativeAwContents, VisualStateFlushCallback callback);
|
| private native void nativeClearView(long nativeAwContents);
|
| private native void nativeSetExtraHeadersForUrl(long nativeAwContents,
|
| String url, String extraHeaders);
|
|
|