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

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

Issue 11192057: [Android] Add supportMultipleWindows setting (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Comments addressed, moved fields in WebPreferences. Created 8 years, 2 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/common/view_messages.h ('k') | content/renderer/render_view_impl.cc » ('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 df314e0979857d83683dec727b966ae975e7870c..92dededd5d426f61dc4b74f44d29b64ba35550d2 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
@@ -74,6 +74,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;
@@ -887,6 +888,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 void setSupportMultipleWindows(boolean support) {
+ 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 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
« no previous file with comments | « content/common/view_messages.h ('k') | content/renderer/render_view_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698