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

Unified Diff: content/browser/android/content_settings.cc

Issue 11192057: [Android] Add supportMultipleWindows setting (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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
Index: content/browser/android/content_settings.cc
diff --git a/content/browser/android/content_settings.cc b/content/browser/android/content_settings.cc
index 611c8c1e67bb62aaafaf5a51e47bab43d99e4bdc..5accba5961d8b3392bf6801dff130409ee951c98 100644
--- a/content/browser/android/content_settings.cc
+++ b/content/browser/android/content_settings.cc
@@ -75,6 +75,8 @@ struct ContentSettings::FieldIds {
GetFieldID(env, clazz, "mAllowFileAccessFromFileURLs", "Z");
java_script_can_open_windows_automatically =
GetFieldID(env, clazz, "mJavaScriptCanOpenWindowsAutomatically", "Z");
+ support_multiple_windows =
+ GetFieldID(env, clazz, "mSupportMultipleWindows", "Z");
dom_storage_enabled =
GetFieldID(env, clazz, "mDomStorageEnabled", "Z");
}
@@ -98,6 +100,7 @@ struct ContentSettings::FieldIds {
jfieldID allow_universal_access_from_file_urls;
jfieldID allow_file_access_from_file_urls;
jfieldID java_script_can_open_windows_automatically;
+ jfieldID support_multiple_windows;
jfieldID dom_storage_enabled;
};
@@ -225,6 +228,12 @@ void ContentSettings::SyncFromNativeImpl() {
prefs.javascript_can_open_windows_automatically);
CheckException(env);
+ env->SetBooleanField(
+ obj,
+ field_ids_->support_multiple_windows,
+ prefs.support_multiple_windows);
+ CheckException(env);
+
Java_ContentSettings_setPluginsDisabled(env, obj, !prefs.plugins_enabled);
CheckException(env);
@@ -319,6 +328,9 @@ void ContentSettings::SyncToNativeImpl() {
prefs.javascript_can_open_windows_automatically = env->GetBooleanField(
obj, field_ids_->java_script_can_open_windows_automatically);
+ prefs.support_multiple_windows = env->GetBooleanField(
+ obj, field_ids_->support_multiple_windows);
+
prefs.plugins_enabled = !Java_ContentSettings_getPluginsDisabled(env, obj);
prefs.local_storage_enabled = env->GetBooleanField(

Powered by Google App Engine
This is Rietveld 408576698