Chromium Code Reviews| 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 416bdcd5bb6c8a498bfbf10e81950f7d2bcf0737..571f218ef1a84e4e68ef73436aec904398d1058f 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 |
| @@ -73,6 +73,7 @@ public class ContentSettings { |
| private boolean mAllowUniversalAccessFromFileURLs = false; |
| private boolean mAllowFileAccessFromFileURLs = false; |
| private boolean mJavaScriptCanOpenWindowsAutomatically = false; |
| + private boolean mSupportMultipleWindows = false; |
| private PluginState mPluginState = PluginState.OFF; |
| private boolean mDomStorageEnabled = false; |
| @@ -859,6 +860,34 @@ public class ContentSettings { |
| } |
| /** |
| + * Tells the WebView whether it supports multiple windows. TRUE means |
| + * that {@link WebChromeClient#onCreateWindow(WebView, boolean, |
| + * boolean, Message)} is implemented by the host application. |
| + */ |
| + public synchronized void setSupportMultipleWindows(boolean support) { |
|
benm (inactive)
2012/10/19 11:02:59
no need for the synchronized here, we use mContent
mnaganov (inactive)
2012/10/19 15:46:39
Sorry, copied the code from the interface definiti
|
| + assert mCanModifySettings; |
| + synchronized (mContentSettingsLock) { |
| + if (mSupportMultipleWindows != support) { |
| + mSupportMultipleWindows = support; |
| + mEventHandler.syncSettingsLocked(); |
| + } |
| + } |
| + } |
| + |
| + /** |
| + * Gets whether the WebView is supporting multiple windows. |
| + * |
| + * @return true if the WebView is supporting multiple windows. This means |
| + * that {@link WebChromeClient#onCreateWindow(WebView, boolean, |
| + * boolean, Message)} is implemented by the host application. |
| + */ |
| + public synchronized boolean supportMultipleWindows() { |
| + synchronized (mContentSettingsLock) { |
| + return mSupportMultipleWindows; |
| + } |
| + } |
| + |
| + /** |
| * Sets whether the DOM storage API is enabled. The default value is false. |
| * |
| * @param flag true if the ContentView should use the DOM storage API |