Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 // blink::WebSettings, content/common/view_messages.h, browser/tab_contents/ | 8 // blink::WebSettings, content/common/view_messages.h, browser/tab_contents/ |
| 9 // render_view_host_delegate_helper.cc, and browser/profiles/profile.cc. | 9 // render_view_host_delegate_helper.cc, and browser/profiles/profile.cc. |
| 10 | 10 |
| 11 #ifndef WEBKIT_COMMON_WEBPREFERENCES_H__ | 11 #ifndef CONTENT_PUBLIC_COMMON_WEBPREFERENCES_H__ |
| 12 #define WEBKIT_COMMON_WEBPREFERENCES_H__ | 12 #define CONTENT_PUBLIC_COMMON_WEBPREFERENCES_H__ |
| 13 | 13 |
| 14 #include <map> | 14 #include <map> |
| 15 #include <string> | 15 #include <string> |
| 16 #include <vector> | 16 #include <vector> |
| 17 | 17 |
| 18 #include "base/strings/string16.h" | 18 #include "base/strings/string16.h" |
| 19 #include "content/common/content_export.h" | |
| 19 #include "url/gurl.h" | 20 #include "url/gurl.h" |
| 20 #include "webkit/common/webkit_common_export.h" | |
| 21 | 21 |
| 22 namespace blink { | 22 namespace blink { |
| 23 class WebView; | 23 class WebView; |
| 24 } | 24 } |
| 25 | 25 |
| 26 struct WebPreferences; | 26 struct WebPreferences; |
| 27 | 27 |
| 28 namespace webkit_glue { | 28 namespace content { |
| 29 | 29 |
| 30 // Map of ISO 15924 four-letter script code to font family. For example, | 30 // Map of ISO 15924 four-letter script code to font family. For example, |
| 31 // "Arab" to "My Arabic Font". | 31 // "Arab" to "My Arabic Font". |
| 32 typedef std::map<std::string, base::string16> ScriptFontFamilyMap; | 32 typedef std::map<std::string, base::string16> ScriptFontFamilyMap; |
| 33 | 33 |
| 34 typedef std::vector<std::pair<std::string, std::string> > | 34 typedef std::vector<std::pair<std::string, std::string> > |
| 35 WebInspectorPreferences; | 35 WebInspectorPreferences; |
| 36 | 36 |
| 37 enum EditingBehavior { | 37 enum EditingBehavior { |
|
jam
2014/01/30 00:08:45
per content api, each struct/class/enum would go i
| |
| 38 EDITING_BEHAVIOR_MAC, | 38 EDITING_BEHAVIOR_MAC, |
| 39 EDITING_BEHAVIOR_WIN, | 39 EDITING_BEHAVIOR_WIN, |
| 40 EDITING_BEHAVIOR_UNIX, | 40 EDITING_BEHAVIOR_UNIX, |
| 41 EDITING_BEHAVIOR_ANDROID | 41 EDITING_BEHAVIOR_ANDROID |
| 42 }; | 42 }; |
| 43 | 43 |
| 44 | 44 |
| 45 // The ISO 15924 script code for undetermined script aka Common. It's the | 45 // The ISO 15924 script code for undetermined script aka Common. It's the |
| 46 // default used on WebKit's side to get/set a font setting when no script is | 46 // default used on WebKit's side to get/set a font setting when no script is |
| 47 // specified. | 47 // specified. |
| 48 WEBKIT_COMMON_EXPORT extern const char kCommonScript[]; | 48 CONTENT_EXPORT extern const char kCommonScript[]; |
| 49 | 49 |
| 50 } // namespace webkit_glue | 50 } // namespace content |
| 51 | 51 |
| 52 struct WEBKIT_COMMON_EXPORT WebPreferences { | 52 struct CONTENT_EXPORT WebPreferences { |
|
jam
2014/01/30 00:08:45
everything in src/content should be in the content
| |
| 53 webkit_glue::ScriptFontFamilyMap standard_font_family_map; | 53 content::ScriptFontFamilyMap standard_font_family_map; |
| 54 webkit_glue::ScriptFontFamilyMap fixed_font_family_map; | 54 content::ScriptFontFamilyMap fixed_font_family_map; |
| 55 webkit_glue::ScriptFontFamilyMap serif_font_family_map; | 55 content::ScriptFontFamilyMap serif_font_family_map; |
| 56 webkit_glue::ScriptFontFamilyMap sans_serif_font_family_map; | 56 content::ScriptFontFamilyMap sans_serif_font_family_map; |
| 57 webkit_glue::ScriptFontFamilyMap cursive_font_family_map; | 57 content::ScriptFontFamilyMap cursive_font_family_map; |
| 58 webkit_glue::ScriptFontFamilyMap fantasy_font_family_map; | 58 content::ScriptFontFamilyMap fantasy_font_family_map; |
| 59 webkit_glue::ScriptFontFamilyMap pictograph_font_family_map; | 59 content::ScriptFontFamilyMap pictograph_font_family_map; |
| 60 int default_font_size; | 60 int default_font_size; |
| 61 int default_fixed_font_size; | 61 int default_fixed_font_size; |
| 62 int minimum_font_size; | 62 int minimum_font_size; |
| 63 int minimum_logical_font_size; | 63 int minimum_logical_font_size; |
| 64 std::string default_encoding; | 64 std::string default_encoding; |
| 65 bool javascript_enabled; | 65 bool javascript_enabled; |
| 66 bool web_security_enabled; | 66 bool web_security_enabled; |
| 67 bool javascript_can_open_windows_automatically; | 67 bool javascript_can_open_windows_automatically; |
| 68 bool loads_images_automatically; | 68 bool loads_images_automatically; |
| 69 bool images_enabled; | 69 bool images_enabled; |
| 70 bool plugins_enabled; | 70 bool plugins_enabled; |
| 71 bool dom_paste_enabled; | 71 bool dom_paste_enabled; |
| 72 webkit_glue::WebInspectorPreferences inspector_settings; | 72 content::WebInspectorPreferences inspector_settings; |
| 73 bool site_specific_quirks_enabled; | 73 bool site_specific_quirks_enabled; |
| 74 bool shrinks_standalone_images_to_fit; | 74 bool shrinks_standalone_images_to_fit; |
| 75 bool uses_universal_detector; | 75 bool uses_universal_detector; |
| 76 bool text_areas_are_resizable; | 76 bool text_areas_are_resizable; |
| 77 bool java_enabled; | 77 bool java_enabled; |
| 78 bool allow_scripts_to_close_windows; | 78 bool allow_scripts_to_close_windows; |
| 79 bool remote_fonts_enabled; | 79 bool remote_fonts_enabled; |
| 80 bool javascript_can_access_clipboard; | 80 bool javascript_can_access_clipboard; |
| 81 bool xslt_enabled; | 81 bool xslt_enabled; |
| 82 bool xss_auditor_enabled; | 82 bool xss_auditor_enabled; |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 140 bool touch_enabled; | 140 bool touch_enabled; |
| 141 bool device_supports_touch; | 141 bool device_supports_touch; |
| 142 bool device_supports_mouse; | 142 bool device_supports_mouse; |
| 143 bool touch_adjustment_enabled; | 143 bool touch_adjustment_enabled; |
| 144 int pointer_events_max_touch_points; | 144 int pointer_events_max_touch_points; |
| 145 bool fixed_position_creates_stacking_context; | 145 bool fixed_position_creates_stacking_context; |
| 146 bool sync_xhr_in_documents_enabled; | 146 bool sync_xhr_in_documents_enabled; |
| 147 bool deferred_image_decoding_enabled; | 147 bool deferred_image_decoding_enabled; |
| 148 bool should_respect_image_orientation; | 148 bool should_respect_image_orientation; |
| 149 int number_of_cpu_cores; | 149 int number_of_cpu_cores; |
| 150 webkit_glue::EditingBehavior editing_behavior; | 150 content::EditingBehavior editing_behavior; |
| 151 bool supports_multiple_windows; | 151 bool supports_multiple_windows; |
| 152 bool viewport_enabled; | 152 bool viewport_enabled; |
| 153 bool viewport_meta_enabled; | 153 bool viewport_meta_enabled; |
| 154 bool main_frame_resizes_are_orientation_changes; | 154 bool main_frame_resizes_are_orientation_changes; |
| 155 bool initialize_at_minimum_page_scale; | 155 bool initialize_at_minimum_page_scale; |
| 156 bool smart_insert_delete_enabled; | 156 bool smart_insert_delete_enabled; |
| 157 bool spatial_navigation_enabled; | 157 bool spatial_navigation_enabled; |
| 158 bool experimental_websocket_enabled; | 158 bool experimental_websocket_enabled; |
| 159 bool pinch_virtual_viewport_enabled; | 159 bool pinch_virtual_viewport_enabled; |
| 160 int pinch_overlay_scrollbar_thickness; | 160 int pinch_overlay_scrollbar_thickness; |
| (...skipping 29 matching lines...) Expand all Loading... | |
| 190 bool report_screen_size_in_physical_pixels_quirk; | 190 bool report_screen_size_in_physical_pixels_quirk; |
| 191 #endif | 191 #endif |
| 192 | 192 |
| 193 // We try to keep the default values the same as the default values in | 193 // We try to keep the default values the same as the default values in |
| 194 // chrome, except for the cases where it would require lots of extra work for | 194 // chrome, except for the cases where it would require lots of extra work for |
| 195 // the embedder to use the same default value. | 195 // the embedder to use the same default value. |
| 196 WebPreferences(); | 196 WebPreferences(); |
| 197 ~WebPreferences(); | 197 ~WebPreferences(); |
| 198 }; | 198 }; |
| 199 | 199 |
| 200 #endif // WEBKIT_COMMON_WEBPREFERENCES_H__ | 200 #endif // CONTENT_PUBLIC_COMMON_WEBPREFERENCES_H__ |
| OLD | NEW |