| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 // A struct for managing webkit's settings. | 5 // A struct for managing webkit's settings. |
| 6 // | 6 // |
| 7 // Adding new values to this class probably involves updating | 7 // Adding new values to this class probably involves updating |
| 8 // WebKit::WebSettings, common/render_messages.h, and | 8 // WebKit::WebSettings, common/render_messages.h, and |
| 9 // browser/profile.cc. | 9 // browser/profile.cc. |
| 10 | 10 |
| 11 #ifndef WEBKIT_GLUE_WEBPREFERENCES_H__ | 11 #ifndef WEBKIT_GLUE_WEBPREFERENCES_H__ |
| 12 #define WEBKIT_GLUE_WEBPREFERENCES_H__ | 12 #define WEBKIT_GLUE_WEBPREFERENCES_H__ |
| 13 | 13 |
| 14 #include <string> | 14 #include <string> |
| 15 #include "googleurl/src/gurl.h" | 15 #include "googleurl/src/gurl.h" |
| 16 | 16 |
| 17 class WebView; | 17 class WebView; |
| 18 | 18 |
| 19 struct WebPreferences { | 19 struct WebPreferences { |
| 20 std::wstring standard_font_family; | 20 std::wstring standard_font_family; |
| 21 std::wstring fixed_font_family; | 21 std::wstring fixed_font_family; |
| 22 std::wstring serif_font_family; | 22 std::wstring serif_font_family; |
| 23 std::wstring sans_serif_font_family; | 23 std::wstring sans_serif_font_family; |
| 24 std::wstring cursive_font_family; | 24 std::wstring cursive_font_family; |
| 25 std::wstring fantasy_font_family; | 25 std::wstring fantasy_font_family; |
| 26 int default_font_size; | 26 int default_font_size; |
| 27 int default_fixed_font_size; | 27 int default_fixed_font_size; |
| 28 int minimum_font_size; | 28 int minimum_font_size; |
| 29 int minimum_logical_font_size; | 29 int minimum_logical_font_size; |
| 30 std::wstring default_encoding; | 30 std::string default_encoding; |
| 31 bool javascript_enabled; | 31 bool javascript_enabled; |
| 32 bool web_security_enabled; | 32 bool web_security_enabled; |
| 33 bool javascript_can_open_windows_automatically; | 33 bool javascript_can_open_windows_automatically; |
| 34 bool loads_images_automatically; | 34 bool loads_images_automatically; |
| 35 bool plugins_enabled; | 35 bool plugins_enabled; |
| 36 bool dom_paste_enabled; | 36 bool dom_paste_enabled; |
| 37 bool developer_extras_enabled; | 37 bool developer_extras_enabled; |
| 38 std::wstring inspector_settings; | 38 std::wstring inspector_settings; |
| 39 bool shrinks_standalone_images_to_fit; | 39 bool shrinks_standalone_images_to_fit; |
| 40 bool uses_universal_detector; | 40 bool uses_universal_detector; |
| (...skipping 20 matching lines...) Expand all Loading... |
| 61 : standard_font_family(L"Times New Roman"), | 61 : standard_font_family(L"Times New Roman"), |
| 62 fixed_font_family(L"Courier New"), | 62 fixed_font_family(L"Courier New"), |
| 63 serif_font_family(L"Times New Roman"), | 63 serif_font_family(L"Times New Roman"), |
| 64 sans_serif_font_family(L"Arial"), | 64 sans_serif_font_family(L"Arial"), |
| 65 cursive_font_family(L"Script"), | 65 cursive_font_family(L"Script"), |
| 66 fantasy_font_family(), // Not sure what to use on Windows. | 66 fantasy_font_family(), // Not sure what to use on Windows. |
| 67 default_font_size(16), | 67 default_font_size(16), |
| 68 default_fixed_font_size(13), | 68 default_fixed_font_size(13), |
| 69 minimum_font_size(1), | 69 minimum_font_size(1), |
| 70 minimum_logical_font_size(6), | 70 minimum_logical_font_size(6), |
| 71 default_encoding(L"ISO-8859-1"), | 71 default_encoding("ISO-8859-1"), |
| 72 javascript_enabled(true), | 72 javascript_enabled(true), |
| 73 web_security_enabled(true), | 73 web_security_enabled(true), |
| 74 javascript_can_open_windows_automatically(true), | 74 javascript_can_open_windows_automatically(true), |
| 75 loads_images_automatically(true), | 75 loads_images_automatically(true), |
| 76 plugins_enabled(true), | 76 plugins_enabled(true), |
| 77 dom_paste_enabled(false), // enables execCommand("paste") | 77 dom_paste_enabled(false), // enables execCommand("paste") |
| 78 developer_extras_enabled(false), // Requires extra work by embedder | 78 developer_extras_enabled(false), // Requires extra work by embedder |
| 79 inspector_settings(L""), | 79 inspector_settings(L""), |
| 80 shrinks_standalone_images_to_fit(true), | 80 shrinks_standalone_images_to_fit(true), |
| 81 uses_universal_detector(false), // Disabled: page cycler regression | 81 uses_universal_detector(false), // Disabled: page cycler regression |
| 82 text_areas_are_resizable(true), | 82 text_areas_are_resizable(true), |
| 83 java_enabled(true), | 83 java_enabled(true), |
| 84 allow_scripts_to_close_windows(false), | 84 allow_scripts_to_close_windows(false), |
| 85 uses_page_cache(false), | 85 uses_page_cache(false), |
| 86 remote_fonts_enabled(false), | 86 remote_fonts_enabled(false), |
| 87 xss_auditor_enabled(false), | 87 xss_auditor_enabled(false), |
| 88 local_storage_enabled(false), | 88 local_storage_enabled(false), |
| 89 databases_enabled(false), | 89 databases_enabled(false), |
| 90 session_storage_enabled(false), | 90 session_storage_enabled(false), |
| 91 application_cache_enabled(false), | 91 application_cache_enabled(false), |
| 92 user_style_sheet_enabled(false) { | 92 user_style_sheet_enabled(false) { |
| 93 } | 93 } |
| 94 | 94 |
| 95 void Apply(WebView* web_view) const; | 95 void Apply(WebView* web_view) const; |
| 96 }; | 96 }; |
| 97 | 97 |
| 98 #endif // WEBKIT_GLUE_WEBPREFERENCES_H__ | 98 #endif // WEBKIT_GLUE_WEBPREFERENCES_H__ |
| OLD | NEW |