From 1de1aa61414b1769e5e3dcda683ed10ab96de06e Mon Sep 17 00:00:00 2001 From: "patrick@chromium.org" Date: Wed, 17 Sep 2008 21:43:30 +0000 Subject: Add a new switch: --allow-scripts-to-close-windows. With this switch, window.close() will always be enabled. Currently the switch is only available in test_shell. Review URL: http://codereview.chromium.org/2915 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2333 0039d316-1c4b-4281-b951-d872f2087c98 --- webkit/glue/webview_impl.cc | 2 ++ 1 file changed, 2 insertions(+) (limited to 'webkit/glue/webview_impl.cc') diff --git a/webkit/glue/webview_impl.cc b/webkit/glue/webview_impl.cc index b94da8c2..b41c9e2 100644 --- a/webkit/glue/webview_impl.cc +++ b/webkit/glue/webview_impl.cc @@ -1106,6 +1106,8 @@ void WebViewImpl::SetPreferences(const WebPreferences& preferences) { preferences.shrinks_standalone_images_to_fit); settings->setUsesUniversalDetector(preferences.uses_universal_detector); settings->setTextAreasAreResizable(preferences.text_areas_are_resizable); + settings->setAllowScriptsToCloseWindows( + preferences.allow_scripts_to_close_windows); if (preferences.user_style_sheet_enabled) { settings->setUserStyleSheetLocation(webkit_glue::GURLToKURL( preferences.user_style_sheet_location)); -- cgit v1.1