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 "base/utf_string_conversions.h" | 8 #include "base/utf_string_conversions.h" |
9 #include "third_party/WebKit/WebKit/chromium/public/WebRuntimeFeatures.h" | 9 #include "third_party/WebKit/WebKit/chromium/public/WebRuntimeFeatures.h" |
10 #include "third_party/WebKit/WebKit/chromium/public/WebKit.h" | 10 #include "third_party/WebKit/WebKit/chromium/public/WebKit.h" |
(...skipping 11 matching lines...) Expand all Loading... |
22 | 22 |
23 WebPreferences::WebPreferences() | 23 WebPreferences::WebPreferences() |
24 : standard_font_family(L"Times New Roman"), | 24 : standard_font_family(L"Times New Roman"), |
25 fixed_font_family(L"Courier New"), | 25 fixed_font_family(L"Courier New"), |
26 serif_font_family(L"Times New Roman"), | 26 serif_font_family(L"Times New Roman"), |
27 sans_serif_font_family(L"Arial"), | 27 sans_serif_font_family(L"Arial"), |
28 cursive_font_family(L"Script"), | 28 cursive_font_family(L"Script"), |
29 fantasy_font_family(), // Not sure what to use on Windows. | 29 fantasy_font_family(), // Not sure what to use on Windows. |
30 default_font_size(16), | 30 default_font_size(16), |
31 default_fixed_font_size(13), | 31 default_fixed_font_size(13), |
32 minimum_font_size(1), | 32 minimum_font_size(0), |
33 minimum_logical_font_size(6), | 33 minimum_logical_font_size(6), |
34 default_encoding("ISO-8859-1"), | 34 default_encoding("ISO-8859-1"), |
35 javascript_enabled(true), | 35 javascript_enabled(true), |
36 web_security_enabled(true), | 36 web_security_enabled(true), |
37 javascript_can_open_windows_automatically(true), | 37 javascript_can_open_windows_automatically(true), |
38 loads_images_automatically(true), | 38 loads_images_automatically(true), |
39 plugins_enabled(true), | 39 plugins_enabled(true), |
40 dom_paste_enabled(false), // enables execCommand("paste") | 40 dom_paste_enabled(false), // enables execCommand("paste") |
41 developer_extras_enabled(false), // Requires extra work by embedder | 41 developer_extras_enabled(false), // Requires extra work by embedder |
42 site_specific_quirks_enabled(false), | 42 site_specific_quirks_enabled(false), |
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
155 | 155 |
156 for (WebInspectorPreferences::const_iterator it = inspector_settings.begin(); | 156 for (WebInspectorPreferences::const_iterator it = inspector_settings.begin(); |
157 it != inspector_settings.end(); ++it) | 157 it != inspector_settings.end(); ++it) |
158 web_view->setInspectorSetting(WebString::fromUTF8(it->first), | 158 web_view->setInspectorSetting(WebString::fromUTF8(it->first), |
159 WebString::fromUTF8(it->second)); | 159 WebString::fromUTF8(it->second)); |
160 | 160 |
161 // Tabs to link is not part of the settings. WebCore calls | 161 // Tabs to link is not part of the settings. WebCore calls |
162 // ChromeClient::tabsToLinks which is part of the glue code. | 162 // ChromeClient::tabsToLinks which is part of the glue code. |
163 web_view->setTabsToLinks(tabs_to_links); | 163 web_view->setTabsToLinks(tabs_to_links); |
164 } | 164 } |
OLD | NEW |