| 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 4118f4915df669673f01165405d1cade1ca5cd26..683304fd6cb9460e2ee3758848a6d86ab9c8490a 100644
|
| --- a/android_webview/java/src/org/chromium/android_webview/AwContents.java
|
| +++ b/android_webview/java/src/org/chromium/android_webview/AwContents.java
|
| @@ -115,6 +115,7 @@ public class AwContents {
|
| private InterceptNavigationDelegateImpl mInterceptNavigationDelegate;
|
| private InternalAccessDelegate mInternalAccessAdapter;
|
| private final AwLayoutSizer mLayoutSizer;
|
| + private AwZoomControls mZoomControls;
|
| // This can be accessed on any thread after construction. See AwContentsIoThreadClient.
|
| private final AwSettings mSettings;
|
| private boolean mIsPaused;
|
| @@ -328,12 +329,15 @@ public class AwContents {
|
| mCleanupReference = new CleanupReference(this, new DestroyRunnable(mNativeAwContents));
|
|
|
| int nativeWebContents = nativeGetWebContents(mNativeAwContents);
|
| - mContentViewCore.initialize(containerView, internalAccessAdapter, nativeWebContents, null);
|
| + mContentViewCore.initialize(
|
| + containerView, internalAccessAdapter, nativeWebContents, null);
|
| mContentViewCore.setContentViewClient(mContentsClient.getContentViewClient());
|
| + mZoomControls = new AwZoomControls(this);
|
| + mContentViewCore.setZoomControlsDelegate(mZoomControls);
|
| mContentsClient.installWebContentsObserver(mContentViewCore);
|
|
|
| mSettings = new AwSettings(mContentViewCore.getContext(), nativeWebContents,
|
| - isAccessFromFileURLsGrantedByDefault);
|
| + mContentViewCore, isAccessFromFileURLsGrantedByDefault);
|
| setIoThreadClient(new IoThreadClientImpl());
|
| setInterceptNavigationDelegate(new InterceptNavigationDelegateImpl());
|
|
|
| @@ -573,11 +577,9 @@ public class AwContents {
|
| ContentViewCore.PERSONALITY_VIEW);
|
| newCore.initialize(mContainerView, mInternalAccessAdapter, newWebContentsPtr, null);
|
| newCore.setContentViewClient(mContentsClient.getContentViewClient());
|
| + newCore.setZoomControlsDelegate(mZoomControls);
|
| mContentsClient.installWebContentsObserver(newCore);
|
|
|
| - ContentSettings oldSettings = mContentViewCore.getContentSettings();
|
| - newCore.getContentSettings().initFrom(oldSettings);
|
| -
|
| // Now swap the Java side reference.
|
| mContentViewCore.destroy();
|
| mContentViewCore = newCore;
|
| @@ -610,6 +612,14 @@ public class AwContents {
|
| }
|
| }
|
|
|
| + public boolean isMultiTouchZoomSupported() {
|
| + return mSettings.supportsMultiTouchZoom();
|
| + }
|
| +
|
| + public View getZoomControlsForTest() {
|
| + return mZoomControls.getZoomControlsViewForTest();
|
| + }
|
| +
|
| //--------------------------------------------------------------------------------------------
|
| // WebView[Provider] method implementations (where not provided by ContentViewCore)
|
| //--------------------------------------------------------------------------------------------
|
|
|