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

Unified Diff: content/public/android/java/src/org/chromium/content/browser/ContentSettings.java

Issue 12217134: [Android WebView] Implement WebSettings.{get|set}LoadWithOverviewMode (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added comment for the message 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
« no previous file with comments | « content/browser/android/content_settings.cc ('k') | content/public/common/common_param_traits_macros.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/android/java/src/org/chromium/content/browser/ContentSettings.java
diff --git a/content/public/android/java/src/org/chromium/content/browser/ContentSettings.java b/content/public/android/java/src/org/chromium/content/browser/ContentSettings.java
index c60f2edd175c11ab7b5e6d8a375550585b670aa5..cd7d600aee900155ebe727e313a11953adf5c70d 100644
--- a/content/public/android/java/src/org/chromium/content/browser/ContentSettings.java
+++ b/content/public/android/java/src/org/chromium/content/browser/ContentSettings.java
@@ -92,6 +92,7 @@ public class ContentSettings {
private boolean mDomStorageEnabled = false;
private boolean mDatabaseEnabled = false;
private boolean mUseWideViewport = false;
+ private boolean mLoadWithOverviewMode = false;
// Not accessed by the native side.
private boolean mSupportZoom = true;
@@ -376,6 +377,22 @@ public class ContentSettings {
return supportsMultiTouchZoom() && mDisplayZoomControls;
}
+ public void setLoadWithOverviewMode(boolean overview) {
+ assert mCanModifySettings;
+ synchronized (mContentSettingsLock) {
+ if (mLoadWithOverviewMode != overview) {
+ mLoadWithOverviewMode = overview;
+ mEventHandler.syncSettingsLocked();
+ }
+ }
+ }
+
+ public boolean getLoadWithOverviewMode() {
+ synchronized (mContentSettingsLock) {
+ return mLoadWithOverviewMode;
+ }
+ }
+
/**
* Sets the text zoom of the page in percent. Default is 100.
*
@@ -1191,6 +1208,7 @@ public class ContentSettings {
*/
public void initFrom(ContentSettings settings) {
setLayoutAlgorithm(settings.getLayoutAlgorithm());
+ setLoadWithOverviewMode(settings.getLoadWithOverviewMode());
setTextZoom(settings.getTextZoom());
setStandardFontFamily(settings.getStandardFontFamily());
setFixedFontFamily(settings.getFixedFontFamily());
« no previous file with comments | « content/browser/android/content_settings.cc ('k') | content/public/common/common_param_traits_macros.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698