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

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: 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
Index: content/browser/android/content_settings.cc
diff --git a/content/browser/android/content_settings.cc b/content/browser/android/content_settings.cc
index 93fcea985fbe2bcf1196e8e81624d80753baf6c0..f381672b00874500481a0eb9e365aa406c8f8a2c 100644
--- a/content/browser/android/content_settings.cc
+++ b/content/browser/android/content_settings.cc
@@ -76,6 +76,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");
}
@@ -100,6 +102,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;
};
@@ -236,6 +239,12 @@ void ContentSettings::SyncFromNativeImpl() {
prefs.javascript_can_open_windows_automatically);
CheckException(env);
+ env->SetBooleanField(
+ obj,
+ field_ids_->support_multiple_windows,
+ prefs.supports_multiple_windows);
+ CheckException(env);
+
Java_ContentSettings_setPluginsDisabled(env, obj, !prefs.plugins_enabled);
CheckException(env);
@@ -337,6 +346,9 @@ void ContentSettings::SyncToNativeImpl() {
prefs.javascript_can_open_windows_automatically = env->GetBooleanField(
obj, field_ids_->java_script_can_open_windows_automatically);
+ prefs.supports_multiple_windows = env->GetBooleanField(
+ obj, field_ids_->support_multiple_windows);
+
prefs.plugins_enabled = !Java_ContentSettings_getPluginsDisabled(env, obj);
prefs.local_storage_enabled = env->GetBooleanField(
« no previous file with comments | « android_webview/javatests/src/org/chromium/android_webview/test/AwSettingsTest.java ('k') | content/common/view_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698