Commit c7871d6f authored by mkosiba@chromium.org's avatar mkosiba@chromium.org

[android_webview] Factor AwWebContentsObserver out of AwContentsClient.

This moves AwWebContentsObserver to be a separate class so that
it can has it's own unittests.

BUG=None
TEST=AndroidWebviewTests

Review URL: https://codereview.chromium.org/445403002

Cr-Commit-Position: refs/heads/master@{#288376}
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@288376 0039d316-1c4b-4281-b951-d872f2087c98
parent 990450ad
...@@ -52,6 +52,7 @@ import org.chromium.content.browser.ContentViewStatics; ...@@ -52,6 +52,7 @@ import org.chromium.content.browser.ContentViewStatics;
import org.chromium.content.browser.LoadUrlParams; import org.chromium.content.browser.LoadUrlParams;
import org.chromium.content.browser.NavigationHistory; import org.chromium.content.browser.NavigationHistory;
import org.chromium.content.browser.PageTransitionTypes; import org.chromium.content.browser.PageTransitionTypes;
import org.chromium.content.browser.WebContentsObserverAndroid;
import org.chromium.content.common.CleanupReference; import org.chromium.content.common.CleanupReference;
import org.chromium.content_public.Referrer; import org.chromium.content_public.Referrer;
import org.chromium.content_public.browser.GestureStateListener; import org.chromium.content_public.browser.GestureStateListener;
...@@ -182,6 +183,7 @@ public class AwContents { ...@@ -182,6 +183,7 @@ public class AwContents {
private ContentViewCore mContentViewCore; private ContentViewCore mContentViewCore;
private final AwContentsClient mContentsClient; private final AwContentsClient mContentsClient;
private final AwContentViewClient mContentViewClient; private final AwContentViewClient mContentViewClient;
private WebContentsObserverAndroid mWebContentsObserver;
private final AwContentsClientBridge mContentsClientBridge; private final AwContentsClientBridge mContentsClientBridge;
private final AwWebContentsDelegateAdapter mWebContentsDelegate; private final AwWebContentsDelegateAdapter mWebContentsDelegate;
private final AwContentsIoThreadClient mIoThreadClient; private final AwContentsIoThreadClient mIoThreadClient;
...@@ -758,7 +760,7 @@ public class AwContents { ...@@ -758,7 +760,7 @@ public class AwContents {
new AwGestureStateListener(), mContentViewClient, mZoomControls); new AwGestureStateListener(), mContentViewClient, mZoomControls);
nativeSetJavaPeers(mNativeAwContents, this, mWebContentsDelegate, mContentsClientBridge, nativeSetJavaPeers(mNativeAwContents, this, mWebContentsDelegate, mContentsClientBridge,
mIoThreadClient, mInterceptNavigationDelegate); mIoThreadClient, mInterceptNavigationDelegate);
mContentsClient.installWebContentsObserver(mContentViewCore.getWebContents()); installWebContentsObserver();
mSettings.setWebContents(nativeWebContents); mSettings.setWebContents(nativeWebContents);
nativeSetDipScale(mNativeAwContents, (float) mDIPScale); nativeSetDipScale(mNativeAwContents, (float) mDIPScale);
...@@ -766,6 +768,14 @@ public class AwContents { ...@@ -766,6 +768,14 @@ public class AwContents {
mContentViewCore.onShow(); mContentViewCore.onShow();
} }
private void installWebContentsObserver() {
if (mWebContentsObserver != null) {
mWebContentsObserver.detachFromWebContents();
}
mWebContentsObserver = new AwWebContentsObserver(mContentViewCore.getWebContents(),
mContentsClient);
}
/** /**
* Called on the "source" AwContents that is opening the popup window to * Called on the "source" AwContents that is opening the popup window to
* provide the AwContents to host the pop up content. * provide the AwContents to host the pop up content.
......
...@@ -18,9 +18,6 @@ import android.webkit.ValueCallback; ...@@ -18,9 +18,6 @@ import android.webkit.ValueCallback;
import android.webkit.WebChromeClient; import android.webkit.WebChromeClient;
import org.chromium.android_webview.permission.AwPermissionRequest; import org.chromium.android_webview.permission.AwPermissionRequest;
import org.chromium.content.browser.WebContentsObserverAndroid;
import org.chromium.content_public.browser.WebContents;
import org.chromium.net.NetError;
import java.security.Principal; import java.security.Principal;
import java.util.HashMap; import java.util.HashMap;
...@@ -38,8 +35,6 @@ public abstract class AwContentsClient { ...@@ -38,8 +35,6 @@ public abstract class AwContentsClient {
private final AwContentsClientCallbackHelper mCallbackHelper; private final AwContentsClientCallbackHelper mCallbackHelper;
private AwWebContentsObserver mWebContentsObserver;
// Last background color reported from the renderer. Holds the sentinal value INVALID_COLOR // Last background color reported from the renderer. Holds the sentinal value INVALID_COLOR
// if not valid. // if not valid.
private int mCachedRendererBackgroundColor = INVALID_COLOR; private int mCachedRendererBackgroundColor = INVALID_COLOR;
...@@ -55,69 +50,6 @@ public abstract class AwContentsClient { ...@@ -55,69 +50,6 @@ public abstract class AwContentsClient {
mCallbackHelper = new AwContentsClientCallbackHelper(looper, this); mCallbackHelper = new AwContentsClientCallbackHelper(looper, this);
} }
class AwWebContentsObserver extends WebContentsObserverAndroid {
public AwWebContentsObserver(WebContents webContents) {
super(webContents);
}
@Override
public void didFinishLoad(long frameId, String validatedUrl, boolean isMainFrame) {
String unreachableWebDataUrl = AwContentsStatics.getUnreachableWebDataUrl();
boolean isErrorUrl =
unreachableWebDataUrl != null && unreachableWebDataUrl.equals(validatedUrl);
if (isMainFrame && !isErrorUrl) {
AwContentsClient.this.onPageFinished(validatedUrl);
}
}
@Override
public void didFailLoad(boolean isProvisionalLoad,
boolean isMainFrame, int errorCode, String description, String failingUrl) {
String unreachableWebDataUrl = AwContentsStatics.getUnreachableWebDataUrl();
boolean isErrorUrl =
unreachableWebDataUrl != null && unreachableWebDataUrl.equals(failingUrl);
if (isMainFrame && !isErrorUrl) {
if (errorCode != NetError.ERR_ABORTED) {
// This error code is generated for the following reasons:
// - WebView.stopLoading is called,
// - the navigation is intercepted by the embedder via shouldOverrideNavigation.
//
// The Android WebView does not notify the embedder of these situations using
// this error code with the WebViewClient.onReceivedError callback.
AwContentsClient.this.onReceivedError(
ErrorCodeConversionHelper.convertErrorCode(errorCode), description,
failingUrl);
}
// Need to call onPageFinished after onReceivedError (if there is an error) for
// backwards compatibility with the classic webview.
AwContentsClient.this.onPageFinished(failingUrl);
}
}
@Override
public void didNavigateMainFrame(String url, String baseUrl,
boolean isNavigationToDifferentPage, boolean isFragmentNavigation) {
// This is here to emulate the Classic WebView firing onPageFinished for main frame
// navigations where only the hash fragment changes.
if (isFragmentNavigation) {
AwContentsClient.this.onPageFinished(url);
}
}
@Override
public void didNavigateAnyFrame(String url, String baseUrl, boolean isReload) {
AwContentsClient.this.doUpdateVisitedHistory(url, isReload);
}
}
final void installWebContentsObserver(WebContents webContents) {
if (mWebContentsObserver != null) {
mWebContentsObserver.detachFromWebContents();
}
mWebContentsObserver = new AwWebContentsObserver(webContents);
}
final AwContentsClientCallbackHelper getCallbackHelper() { final AwContentsClientCallbackHelper getCallbackHelper() {
return mCallbackHelper; return mCallbackHelper;
} }
......
// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
package org.chromium.android_webview;
import org.chromium.content.browser.WebContentsObserverAndroid;
import org.chromium.content_public.browser.WebContents;
import org.chromium.net.NetError;
/**
* Routes notifications from WebContents to AwContentsClient and other listeners.
*/
public class AwWebContentsObserver extends WebContentsObserverAndroid {
private final AwContentsClient mAwContentsClient;
public AwWebContentsObserver(WebContents webContents, AwContentsClient awContentsClient) {
super(webContents);
mAwContentsClient = awContentsClient;
}
@Override
public void didFinishLoad(long frameId, String validatedUrl, boolean isMainFrame) {
String unreachableWebDataUrl = AwContentsStatics.getUnreachableWebDataUrl();
boolean isErrorUrl =
unreachableWebDataUrl != null && unreachableWebDataUrl.equals(validatedUrl);
if (isMainFrame && !isErrorUrl) {
mAwContentsClient.onPageFinished(validatedUrl);
}
}
@Override
public void didFailLoad(boolean isProvisionalLoad,
boolean isMainFrame, int errorCode, String description, String failingUrl) {
String unreachableWebDataUrl = AwContentsStatics.getUnreachableWebDataUrl();
boolean isErrorUrl =
unreachableWebDataUrl != null && unreachableWebDataUrl.equals(failingUrl);
if (isMainFrame && !isErrorUrl) {
if (errorCode != NetError.ERR_ABORTED) {
// This error code is generated for the following reasons:
// - WebView.stopLoading is called,
// - the navigation is intercepted by the embedder via shouldOverrideNavigation.
//
// The Android WebView does not notify the embedder of these situations using
// this error code with the WebViewClient.onReceivedError callback.
mAwContentsClient.onReceivedError(
ErrorCodeConversionHelper.convertErrorCode(errorCode), description,
failingUrl);
}
// Need to call onPageFinished after onReceivedError (if there is an error) for
// backwards compatibility with the classic webview.
mAwContentsClient.onPageFinished(failingUrl);
}
}
@Override
public void didNavigateMainFrame(String url, String baseUrl,
boolean isNavigationToDifferentPage, boolean isFragmentNavigation) {
// This is here to emulate the Classic WebView firing onPageFinished for main frame
// navigations where only the hash fragment changes.
if (isFragmentNavigation) {
mAwContentsClient.onPageFinished(url);
}
}
@Override
public void didNavigateAnyFrame(String url, String baseUrl, boolean isReload) {
mAwContentsClient.doUpdateVisitedHistory(url, isReload);
}
}
...@@ -8,6 +8,7 @@ import android.test.suitebuilder.annotation.SmallTest; ...@@ -8,6 +8,7 @@ import android.test.suitebuilder.annotation.SmallTest;
import android.webkit.ValueCallback; import android.webkit.ValueCallback;
import org.chromium.android_webview.AwContents; import org.chromium.android_webview.AwContents;
import org.chromium.android_webview.test.TestAwContentsClient.DoUpdateVisitedHistoryHelper;
import org.chromium.base.test.util.Feature; import org.chromium.base.test.util.Feature;
import org.chromium.content.browser.test.util.CallbackHelper; import org.chromium.content.browser.test.util.CallbackHelper;
import org.chromium.net.test.util.TestWebServer; import org.chromium.net.test.util.TestWebServer;
...@@ -16,7 +17,7 @@ import org.chromium.net.test.util.TestWebServer; ...@@ -16,7 +17,7 @@ import org.chromium.net.test.util.TestWebServer;
* Tests for AwContentsClient.getVisitedHistory and AwContents.doUpdateVisitedHistory callbacks. * Tests for AwContentsClient.getVisitedHistory and AwContents.doUpdateVisitedHistory callbacks.
*/ */
public class AwContentsClientVisitedHistoryTest extends AwTestBase { public class AwContentsClientVisitedHistoryTest extends AwTestBase {
public static class GetVisitedHistoryHelper extends CallbackHelper { private static class GetVisitedHistoryHelper extends CallbackHelper {
private ValueCallback<String[]> mCallback; private ValueCallback<String[]> mCallback;
private boolean mSaveCallback = false; private boolean mSaveCallback = false;
...@@ -37,58 +38,27 @@ public class AwContentsClientVisitedHistoryTest extends AwTestBase { ...@@ -37,58 +38,27 @@ public class AwContentsClientVisitedHistoryTest extends AwTestBase {
} }
} }
public static class DoUpdateVisitedHistoryHelper extends CallbackHelper { private static class VisitedHistoryTestAwContentsClient extends TestAwContentsClient {
String mUrl;
boolean mIsReload;
public String getUrl() {
assert getCallCount() > 0;
return mUrl;
}
public boolean getIsReload() {
assert getCallCount() > 0;
return mIsReload;
}
public void notifyCalled(String url, boolean isReload) {
mUrl = url;
mIsReload = isReload;
notifyCalled();
}
}
private static class TestAwContentsClient
extends org.chromium.android_webview.test.TestAwContentsClient {
private GetVisitedHistoryHelper mGetVisitedHistoryHelper; private GetVisitedHistoryHelper mGetVisitedHistoryHelper;
private DoUpdateVisitedHistoryHelper mDoUpdateVisitedHistoryHelper;
public TestAwContentsClient() { public VisitedHistoryTestAwContentsClient() {
mGetVisitedHistoryHelper = new GetVisitedHistoryHelper(); mGetVisitedHistoryHelper = new GetVisitedHistoryHelper();
mDoUpdateVisitedHistoryHelper = new DoUpdateVisitedHistoryHelper();
} }
public GetVisitedHistoryHelper getGetVisitedHistoryHelper() { public GetVisitedHistoryHelper getGetVisitedHistoryHelper() {
return mGetVisitedHistoryHelper; return mGetVisitedHistoryHelper;
} }
public DoUpdateVisitedHistoryHelper getDoUpdateVisitedHistoryHelper() {
return mDoUpdateVisitedHistoryHelper;
}
@Override @Override
public void getVisitedHistory(ValueCallback<String[]> callback) { public void getVisitedHistory(ValueCallback<String[]> callback) {
getGetVisitedHistoryHelper().notifyCalled(callback); getGetVisitedHistoryHelper().notifyCalled(callback);
} }
@Override
public void doUpdateVisitedHistory(String url, boolean isReload) {
getDoUpdateVisitedHistoryHelper().notifyCalled(url, isReload);
}
} }
private TestAwContentsClient mContentsClient = new TestAwContentsClient(); private VisitedHistoryTestAwContentsClient mContentsClient =
new VisitedHistoryTestAwContentsClient();
@Feature({"AndroidWebView"}) @Feature({"AndroidWebView"})
@SmallTest @SmallTest
......
// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
package org.chromium.android_webview.test;
import android.test.suitebuilder.annotation.SmallTest;
import org.chromium.android_webview.AwContentsStatics;
import org.chromium.android_webview.AwWebContentsObserver;
import org.chromium.base.test.util.Feature;
import org.chromium.net.NetError;
/**
* Tests for the AwWebContentsObserver class.
*/
public class AwWebContentsObserverTest extends AwTestBase {
private TestAwContentsClient mContentsClient;
private AwTestContainerView mTestContainerView;
private AwWebContentsObserver mWebContentsObserver;
private static final String EXAMPLE_URL = "http://www.example.com/";
private static final String ERROR_DESCRIPTION = "description";
private String mUnreachableWebDataUrl;
@Override
public void setUp() throws Exception {
super.setUp();
mContentsClient = new TestAwContentsClient();
mTestContainerView = createAwTestContainerViewOnMainSync(mContentsClient);
mUnreachableWebDataUrl = AwContentsStatics.getUnreachableWebDataUrl();
// AwWebContentsObserver constructor must be run on the UI thread.
getInstrumentation().runOnMainSync(new Runnable() {
@Override
public void run() {
mWebContentsObserver = new AwWebContentsObserver(
mTestContainerView.getContentViewCore().getWebContents(), mContentsClient);
}
});
}
@SmallTest
@Feature({"AndroidWebView"})
public void testOnPageFinished() {
int frameId = 0;
boolean mainFrame = true;
boolean subFrame = false;
int callCount = mContentsClient.getOnPageFinishedHelper().getCallCount();
mWebContentsObserver.didFinishLoad(frameId, EXAMPLE_URL, subFrame);
assertEquals("onPageFinished should only be called for the main frame.", callCount,
mContentsClient.getOnPageFinishedHelper().getCallCount());
callCount = mContentsClient.getOnPageFinishedHelper().getCallCount();
mWebContentsObserver.didFinishLoad(frameId, mUnreachableWebDataUrl, mainFrame);
assertEquals("onPageFinished should not be called for the error url.", callCount,
mContentsClient.getOnPageFinishedHelper().getCallCount());
callCount = mContentsClient.getOnPageFinishedHelper().getCallCount();
mWebContentsObserver.didFinishLoad(frameId, EXAMPLE_URL, mainFrame);
assertEquals("onPageFinished should be called for main frame navigations.", callCount + 1,
mContentsClient.getOnPageFinishedHelper().getCallCount());
boolean provisionalLoad = true;
callCount = mContentsClient.getOnPageFinishedHelper().getCallCount();
mWebContentsObserver.didFailLoad(!provisionalLoad, mainFrame,
NetError.ERR_ABORTED, ERROR_DESCRIPTION, EXAMPLE_URL);
assertEquals("onPageFinished should be called for main frame errors.", callCount + 1,
mContentsClient.getOnPageFinishedHelper().getCallCount());
callCount = mContentsClient.getOnPageFinishedHelper().getCallCount();
mWebContentsObserver.didFailLoad(!provisionalLoad, subFrame,
NetError.ERR_ABORTED, ERROR_DESCRIPTION, EXAMPLE_URL);
assertEquals("onPageFinished should only be called for main frame errors.", callCount,
mContentsClient.getOnPageFinishedHelper().getCallCount());
callCount = mContentsClient.getOnPageFinishedHelper().getCallCount();
mWebContentsObserver.didFailLoad(!provisionalLoad, mainFrame,
NetError.ERR_ABORTED, ERROR_DESCRIPTION, mUnreachableWebDataUrl);
assertEquals("onPageFinished should not be called on unrechable url errors.", callCount,
mContentsClient.getOnPageFinishedHelper().getCallCount());
String baseUrl = null;
boolean navigationToDifferentPage = true;
boolean fragmentNavigation = true;
callCount = mContentsClient.getOnPageFinishedHelper().getCallCount();
mWebContentsObserver.didNavigateMainFrame(EXAMPLE_URL, baseUrl,
!navigationToDifferentPage, fragmentNavigation);
assertEquals("onPageFinished should be called for main frame fragment navigations.",
callCount + 1, mContentsClient.getOnPageFinishedHelper().getCallCount());
callCount = mContentsClient.getOnPageFinishedHelper().getCallCount();
mWebContentsObserver.didNavigateMainFrame(EXAMPLE_URL, baseUrl,
!navigationToDifferentPage, !fragmentNavigation);
assertEquals("onPageFinished should be called only for main frame fragment navigations.",
callCount, mContentsClient.getOnPageFinishedHelper().getCallCount());
}
@SmallTest
@Feature({"AndroidWebView"})
public void testOnReceivedError() {
boolean provisionalLoad = true;
boolean mainFrame = true;
boolean subFrame = false;
int callCount = mContentsClient.getOnReceivedErrorHelper().getCallCount();
mWebContentsObserver.didFailLoad(!provisionalLoad, subFrame,
NetError.ERR_TIMED_OUT, ERROR_DESCRIPTION, EXAMPLE_URL);
assertEquals("onReceivedError should only be called for the main frame", callCount,
mContentsClient.getOnReceivedErrorHelper().getCallCount());
callCount = mContentsClient.getOnReceivedErrorHelper().getCallCount();
mWebContentsObserver.didFailLoad(!provisionalLoad, mainFrame,
NetError.ERR_TIMED_OUT, ERROR_DESCRIPTION, EXAMPLE_URL);
assertEquals("onReceivedError should be called for the main frame", callCount + 1,
mContentsClient.getOnReceivedErrorHelper().getCallCount());
callCount = mContentsClient.getOnReceivedErrorHelper().getCallCount();
mWebContentsObserver.didFailLoad(!provisionalLoad, mainFrame,
NetError.ERR_ABORTED, ERROR_DESCRIPTION, EXAMPLE_URL);
assertEquals("onReceivedError should not be called for aborted navigations", callCount,
mContentsClient.getOnReceivedErrorHelper().getCallCount());
}
@SmallTest
@Feature({"AndroidWebView"})
public void testDidNavigateMainFrame() {
String nullUrl = null;
String baseUrl = null;
boolean reload = true;
int callCount = mContentsClient.getDoUpdateVisitedHistoryHelper().getCallCount();
mWebContentsObserver.didNavigateAnyFrame(nullUrl, baseUrl, !reload);
assertEquals("doUpdateVisitedHistory should only be called for any url.", callCount + 1,
mContentsClient.getDoUpdateVisitedHistoryHelper().getCallCount());
assertEquals(!reload, mContentsClient.getDoUpdateVisitedHistoryHelper().getIsReload());
callCount = mContentsClient.getDoUpdateVisitedHistoryHelper().getCallCount();
mWebContentsObserver.didNavigateAnyFrame(EXAMPLE_URL, baseUrl, !reload);
assertEquals("doUpdateVisitedHistory should only be called for any url.", callCount + 1,
mContentsClient.getDoUpdateVisitedHistoryHelper().getCallCount());
assertEquals(!reload, mContentsClient.getDoUpdateVisitedHistoryHelper().getIsReload());
callCount = mContentsClient.getDoUpdateVisitedHistoryHelper().getCallCount();
mWebContentsObserver.didNavigateAnyFrame(EXAMPLE_URL, baseUrl, reload);
assertEquals("doUpdateVisitedHistory should be called for reloads.", callCount + 1,
mContentsClient.getDoUpdateVisitedHistoryHelper().getCallCount());
assertEquals(reload, mContentsClient.getDoUpdateVisitedHistoryHelper().getIsReload());
}
}
...@@ -29,6 +29,7 @@ public class TestAwContentsClient extends NullContentsClient { ...@@ -29,6 +29,7 @@ public class TestAwContentsClient extends NullContentsClient {
private final OnScaleChangedHelper mOnScaleChangedHelper; private final OnScaleChangedHelper mOnScaleChangedHelper;
private final PictureListenerHelper mPictureListenerHelper; private final PictureListenerHelper mPictureListenerHelper;
private final ShouldOverrideUrlLoadingHelper mShouldOverrideUrlLoadingHelper; private final ShouldOverrideUrlLoadingHelper mShouldOverrideUrlLoadingHelper;
private final DoUpdateVisitedHistoryHelper mDoUpdateVisitedHistoryHelper;
public TestAwContentsClient() { public TestAwContentsClient() {
super(ThreadUtils.getUiThreadLooper()); super(ThreadUtils.getUiThreadLooper());
...@@ -42,6 +43,7 @@ public class TestAwContentsClient extends NullContentsClient { ...@@ -42,6 +43,7 @@ public class TestAwContentsClient extends NullContentsClient {
mOnScaleChangedHelper = new OnScaleChangedHelper(); mOnScaleChangedHelper = new OnScaleChangedHelper();
mPictureListenerHelper = new PictureListenerHelper(); mPictureListenerHelper = new PictureListenerHelper();
mShouldOverrideUrlLoadingHelper = new ShouldOverrideUrlLoadingHelper(); mShouldOverrideUrlLoadingHelper = new ShouldOverrideUrlLoadingHelper();
mDoUpdateVisitedHistoryHelper = new DoUpdateVisitedHistoryHelper();
} }
public OnPageStartedHelper getOnPageStartedHelper() { public OnPageStartedHelper getOnPageStartedHelper() {
...@@ -76,6 +78,10 @@ public class TestAwContentsClient extends NullContentsClient { ...@@ -76,6 +78,10 @@ public class TestAwContentsClient extends NullContentsClient {
return mAddMessageToConsoleHelper; return mAddMessageToConsoleHelper;
} }
public DoUpdateVisitedHistoryHelper getDoUpdateVisitedHistoryHelper() {
return mDoUpdateVisitedHistoryHelper;
}
/** /**
* Callback helper for onScaleChangedScaled. * Callback helper for onScaleChangedScaled.
*/ */
...@@ -341,4 +347,34 @@ public class TestAwContentsClient extends NullContentsClient { ...@@ -341,4 +347,34 @@ public class TestAwContentsClient extends NullContentsClient {
mShouldOverrideUrlLoadingHelper.notifyCalled(url); mShouldOverrideUrlLoadingHelper.notifyCalled(url);
return returnValue; return returnValue;
} }
/**
* Callback helper for doUpdateVisitedHistory.
*/
public static class DoUpdateVisitedHistoryHelper extends CallbackHelper {
String mUrl;
boolean mIsReload;
public String getUrl() {
assert getCallCount() > 0;
return mUrl;
}
public boolean getIsReload() {
assert getCallCount() > 0;
return mIsReload;
}
public void notifyCalled(String url, boolean isReload) {
mUrl = url;
mIsReload = isReload;
notifyCalled();
}
}
@Override
public void doUpdateVisitedHistory(String url, boolean isReload) {
getDoUpdateVisitedHistoryHelper().notifyCalled(url, isReload);
}
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment