| Index: android_webview/java/src/org/chromium/android_webview/AwSettings.java
|
| diff --git a/android_webview/java/src/org/chromium/android_webview/AwSettings.java b/android_webview/java/src/org/chromium/android_webview/AwSettings.java
|
| index 426cf1362a5abf075d84d8177bfa3ef630040e0c..ab2df55eb93daf03301e3fa3ff1d8da6cfcfda89 100644
|
| --- a/android_webview/java/src/org/chromium/android_webview/AwSettings.java
|
| +++ b/android_webview/java/src/org/chromium/android_webview/AwSettings.java
|
| @@ -24,6 +24,7 @@ public class AwSettings {
|
| // Lock to protect all settings.
|
| private final Object mAwSettingsLock = new Object();
|
|
|
| + private AwContents mContents;
|
| private final Context mContext;
|
| private boolean mBlockNetworkLoads; // Default depends on permission of embedding APK.
|
| private boolean mAllowContentUrlAccess = true;
|
| @@ -35,7 +36,8 @@ public class AwSettings {
|
| // The native side of this object.
|
| private int mNativeAwSettings = 0;
|
|
|
| - public AwSettings(Context context, int nativeWebContents) {
|
| + public AwSettings(AwContents contents, Context context, int nativeWebContents) {
|
| + mContents = contents;
|
| mContext = context;
|
| mBlockNetworkLoads = mContext.checkPermission(
|
| android.Manifest.permission.INTERNET,
|
| @@ -46,6 +48,7 @@ public class AwSettings {
|
| }
|
|
|
| public void destroy() {
|
| + mContents = null;
|
| nativeDestroy(mNativeAwSettings);
|
| mNativeAwSettings = 0;
|
| }
|
| @@ -160,6 +163,15 @@ public class AwSettings {
|
| });
|
| }
|
|
|
| + public void resetScrollAndScaleState() {
|
| + ThreadUtils.runOnUiThreadBlocking(new Runnable() {
|
| + @Override
|
| + public void run() {
|
| + mContents.resetScrollAndScaleState();
|
| + }
|
| + });
|
| + }
|
| +
|
| /**
|
| * See {@link android.webkit.WebSettings#setNeedInitialFocus}.
|
| */
|
|
|