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

Unified Diff: android_webview/java/src/org/chromium/android_webview/AwSettings.java

Issue 12217134: [Android WebView] Implement WebSettings.{get|set}LoadWithOverviewMode (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Really get rid of render_view_impl.cc change Created 7 years, 10 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 side-by-side diff with in-line comments
Download patch
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}.
*/

Powered by Google App Engine
This is Rietveld 408576698