| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "webkit/glue/webpreferences.h" | 5 #include "webkit/glue/webpreferences.h" |
| 6 | 6 |
| 7 #include "base/string_util.h" | 7 #include "base/string_util.h" |
| 8 #include "third_party/WebKit/WebKit/chromium/public/WebRuntimeFeatures.h" | 8 #include "third_party/WebKit/WebKit/chromium/public/WebRuntimeFeatures.h" |
| 9 #include "third_party/WebKit/WebKit/chromium/public/WebKit.h" | 9 #include "third_party/WebKit/WebKit/chromium/public/WebKit.h" |
| 10 #include "third_party/WebKit/WebKit/chromium/public/WebSettings.h" | 10 #include "third_party/WebKit/WebKit/chromium/public/WebSettings.h" |
| (...skipping 22 matching lines...) Expand all Loading... |
| 33 settings->setMinimumLogicalFontSize(minimum_logical_font_size); | 33 settings->setMinimumLogicalFontSize(minimum_logical_font_size); |
| 34 settings->setDefaultTextEncodingName(ASCIIToUTF16(default_encoding)); | 34 settings->setDefaultTextEncodingName(ASCIIToUTF16(default_encoding)); |
| 35 settings->setJavaScriptEnabled(javascript_enabled); | 35 settings->setJavaScriptEnabled(javascript_enabled); |
| 36 settings->setWebSecurityEnabled(web_security_enabled); | 36 settings->setWebSecurityEnabled(web_security_enabled); |
| 37 settings->setJavaScriptCanOpenWindowsAutomatically( | 37 settings->setJavaScriptCanOpenWindowsAutomatically( |
| 38 javascript_can_open_windows_automatically); | 38 javascript_can_open_windows_automatically); |
| 39 settings->setLoadsImagesAutomatically(loads_images_automatically); | 39 settings->setLoadsImagesAutomatically(loads_images_automatically); |
| 40 settings->setPluginsEnabled(plugins_enabled); | 40 settings->setPluginsEnabled(plugins_enabled); |
| 41 settings->setDOMPasteAllowed(dom_paste_enabled); | 41 settings->setDOMPasteAllowed(dom_paste_enabled); |
| 42 settings->setDeveloperExtrasEnabled(developer_extras_enabled); | 42 settings->setDeveloperExtrasEnabled(developer_extras_enabled); |
| 43 settings->setNeedsSiteSpecificQuirks(site_specific_quirks_enabled); |
| 43 settings->setShrinksStandaloneImagesToFit(shrinks_standalone_images_to_fit); | 44 settings->setShrinksStandaloneImagesToFit(shrinks_standalone_images_to_fit); |
| 44 settings->setUsesEncodingDetector(uses_universal_detector); | 45 settings->setUsesEncodingDetector(uses_universal_detector); |
| 45 settings->setTextAreasAreResizable(text_areas_are_resizable); | 46 settings->setTextAreasAreResizable(text_areas_are_resizable); |
| 46 settings->setAllowScriptsToCloseWindows(allow_scripts_to_close_windows); | 47 settings->setAllowScriptsToCloseWindows(allow_scripts_to_close_windows); |
| 47 if (user_style_sheet_enabled) | 48 if (user_style_sheet_enabled) |
| 48 settings->setUserStyleSheetLocation(user_style_sheet_location); | 49 settings->setUserStyleSheetLocation(user_style_sheet_location); |
| 49 else | 50 else |
| 50 settings->setUserStyleSheetLocation(WebURL()); | 51 settings->setUserStyleSheetLocation(WebURL()); |
| 51 settings->setUsesPageCache(uses_page_cache); | 52 settings->setUsesPageCache(uses_page_cache); |
| 52 settings->setDownloadableBinaryFontsEnabled(remote_fonts_enabled); | 53 settings->setDownloadableBinaryFontsEnabled(remote_fonts_enabled); |
| (...skipping 30 matching lines...) Expand all Loading... |
| 83 // and support is compiled in. | 84 // and support is compiled in. |
| 84 settings->setExperimentalWebGLEnabled(experimental_webgl_enabled); | 85 settings->setExperimentalWebGLEnabled(experimental_webgl_enabled); |
| 85 | 86 |
| 86 // Web inspector settings need to be passed in differently. | 87 // Web inspector settings need to be passed in differently. |
| 87 web_view->setInspectorSettings(WebString::fromUTF8(inspector_settings)); | 88 web_view->setInspectorSettings(WebString::fromUTF8(inspector_settings)); |
| 88 | 89 |
| 89 // Tabs to link is not part of the settings. WebCore calls | 90 // Tabs to link is not part of the settings. WebCore calls |
| 90 // ChromeClient::tabsToLinks which is part of the glue code. | 91 // ChromeClient::tabsToLinks which is part of the glue code. |
| 91 web_view->setTabsToLinks(tabs_to_links); | 92 web_view->setTabsToLinks(tabs_to_links); |
| 92 } | 93 } |
| OLD | NEW |