| 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 7569758a650f63aa78363fa0dfcbc44e579d3dc8..ceb2f88420555f684831594eaa32f84a928096f2 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
|
| @@ -90,6 +90,7 @@ public class ContentSettings {
|
| private PluginState mPluginState = PluginState.OFF;
|
| private boolean mAppCacheEnabled = false;
|
| private boolean mDomStorageEnabled = false;
|
| + private boolean mUseWideViewport = false;
|
|
|
| // Not accessed by the native side.
|
| private boolean mSupportZoom = true;
|
| @@ -995,6 +996,40 @@ public class ContentSettings {
|
| }
|
|
|
| /**
|
| + * Sets whether the WebView should enable support for the "viewport"
|
| + * HTML meta tag or should use a wide viewport.
|
| + * When the value of the setting is false, the layout width is always set to the
|
| + * width of the WebView control in device-independent (CSS) pixels.
|
| + * When the value is true and the page contains the viewport meta tag, the value
|
| + * of the width specified in the tag is used. If the page does not contain the tag or
|
| + * does not provide a width, then a wide viewport will be used.
|
| + *
|
| + * @param use whether to enable support for the viewport meta tag
|
| + */
|
| + public void setUseWideViewPort(boolean use) {
|
| + assert mCanModifySettings;
|
| + synchronized (mContentSettingsLock) {
|
| + if (mUseWideViewport != use) {
|
| + mUseWideViewport = use;
|
| + mEventHandler.syncSettingsLocked();
|
| + }
|
| + }
|
| + }
|
| +
|
| + /**
|
| + * Gets whether the WebView supports the "viewport"
|
| + * HTML meta tag or will use a wide viewport.
|
| + *
|
| + * @return true if the WebView supports the viewport meta tag
|
| + * @see #setUseWideViewPort
|
| + */
|
| + public boolean getUseWideViewPort() {
|
| + synchronized (mContentSettingsLock) {
|
| + return mUseWideViewport;
|
| + }
|
| + }
|
| +
|
| + /**
|
| * Sets whether the Application Caches API should be enabled. The default
|
| * is false. Note that in order for the Application Caches API to be
|
| * enabled, a non-empty database path must also be supplied to
|
|
|