Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(564)

Side by Side Diff: content/public/common/web_preferences.h

Issue 357203003: Move webpreferences.* from webkit/ to content/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: android fix - webview() -> web_view Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 //
5 // A struct for managing webkit's settings.
6 //
7 // Adding new values to this class probably involves updating
8 // blink::WebSettings, content/common/view_messages.h, browser/tab_contents/
9 // render_view_host_delegate_helper.cc, and browser/profiles/profile.cc.
10 4
11 #ifndef WEBKIT_COMMON_WEBPREFERENCES_H__ 5 #ifndef CONTENT_PUBLIC_COMMON_WEB_PREFERENCES_H_
12 #define WEBKIT_COMMON_WEBPREFERENCES_H__ 6 #define CONTENT_PUBLIC_COMMON_WEB_PREFERENCES_H_
13 7
14 #include <map> 8 #include <map>
15 #include <string> 9 #include <string>
16 #include <vector> 10 #include <vector>
17 11
18 #include "base/strings/string16.h" 12 #include "base/strings/string16.h"
13 #include "content/common/content_export.h"
19 #include "net/base/network_change_notifier.h" 14 #include "net/base/network_change_notifier.h"
20 #include "url/gurl.h" 15 #include "url/gurl.h"
21 #include "webkit/common/webkit_common_export.h"
22 16
23 namespace blink { 17 namespace blink {
24 class WebView; 18 class WebView;
25 } 19 }
26 20
27 struct WebPreferences; 21 namespace content {
28
29 namespace webkit_glue {
30 22
31 // Map of ISO 15924 four-letter script code to font family. For example, 23 // Map of ISO 15924 four-letter script code to font family. For example,
32 // "Arab" to "My Arabic Font". 24 // "Arab" to "My Arabic Font".
33 typedef std::map<std::string, base::string16> ScriptFontFamilyMap; 25 typedef std::map<std::string, base::string16> ScriptFontFamilyMap;
34 26
35 typedef std::vector<std::pair<std::string, std::string> > 27 typedef std::vector<std::pair<std::string, std::string> >
36 WebInspectorPreferences; 28 WebInspectorPreferences;
37 29
38 enum EditingBehavior { 30 enum EditingBehavior {
39 EDITING_BEHAVIOR_MAC, 31 EDITING_BEHAVIOR_MAC,
40 EDITING_BEHAVIOR_WIN, 32 EDITING_BEHAVIOR_WIN,
41 EDITING_BEHAVIOR_UNIX, 33 EDITING_BEHAVIOR_UNIX,
42 EDITING_BEHAVIOR_ANDROID, 34 EDITING_BEHAVIOR_ANDROID,
43 EDITING_BEHAVIOR_LAST = EDITING_BEHAVIOR_ANDROID 35 EDITING_BEHAVIOR_LAST = EDITING_BEHAVIOR_ANDROID
44 }; 36 };
45 37
46
47 // The ISO 15924 script code for undetermined script aka Common. It's the 38 // The ISO 15924 script code for undetermined script aka Common. It's the
48 // default used on WebKit's side to get/set a font setting when no script is 39 // default used on WebKit's side to get/set a font setting when no script is
49 // specified. 40 // specified.
50 WEBKIT_COMMON_EXPORT extern const char kCommonScript[]; 41 CONTENT_EXPORT extern const char kCommonScript[];
51 42
52 } // namespace webkit_glue 43 // A struct for managing blink's settings.
53 44 //
54 struct WEBKIT_COMMON_EXPORT WebPreferences { 45 // Adding new values to this class probably involves updating
55 webkit_glue::ScriptFontFamilyMap standard_font_family_map; 46 // blink::WebSettings, content/common/view_messages.h, browser/tab_contents/
56 webkit_glue::ScriptFontFamilyMap fixed_font_family_map; 47 // render_view_host_delegate_helper.cc, and browser/profiles/profile.cc.
57 webkit_glue::ScriptFontFamilyMap serif_font_family_map; 48 struct CONTENT_EXPORT WebPreferences {
58 webkit_glue::ScriptFontFamilyMap sans_serif_font_family_map; 49 ScriptFontFamilyMap standard_font_family_map;
59 webkit_glue::ScriptFontFamilyMap cursive_font_family_map; 50 ScriptFontFamilyMap fixed_font_family_map;
60 webkit_glue::ScriptFontFamilyMap fantasy_font_family_map; 51 ScriptFontFamilyMap serif_font_family_map;
61 webkit_glue::ScriptFontFamilyMap pictograph_font_family_map; 52 ScriptFontFamilyMap sans_serif_font_family_map;
53 ScriptFontFamilyMap cursive_font_family_map;
54 ScriptFontFamilyMap fantasy_font_family_map;
55 ScriptFontFamilyMap pictograph_font_family_map;
62 int default_font_size; 56 int default_font_size;
63 int default_fixed_font_size; 57 int default_fixed_font_size;
64 int minimum_font_size; 58 int minimum_font_size;
65 int minimum_logical_font_size; 59 int minimum_logical_font_size;
66 std::string default_encoding; 60 std::string default_encoding;
67 bool javascript_enabled; 61 bool javascript_enabled;
68 bool web_security_enabled; 62 bool web_security_enabled;
69 bool javascript_can_open_windows_automatically; 63 bool javascript_can_open_windows_automatically;
70 bool loads_images_automatically; 64 bool loads_images_automatically;
71 bool images_enabled; 65 bool images_enabled;
72 bool plugins_enabled; 66 bool plugins_enabled;
73 bool dom_paste_enabled; 67 bool dom_paste_enabled;
74 webkit_glue::WebInspectorPreferences inspector_settings; 68 WebInspectorPreferences inspector_settings;
75 bool site_specific_quirks_enabled; 69 bool site_specific_quirks_enabled;
76 bool shrinks_standalone_images_to_fit; 70 bool shrinks_standalone_images_to_fit;
77 bool uses_universal_detector; 71 bool uses_universal_detector;
78 bool text_areas_are_resizable; 72 bool text_areas_are_resizable;
79 bool java_enabled; 73 bool java_enabled;
80 bool allow_scripts_to_close_windows; 74 bool allow_scripts_to_close_windows;
81 bool remote_fonts_enabled; 75 bool remote_fonts_enabled;
82 bool javascript_can_access_clipboard; 76 bool javascript_can_access_clipboard;
83 bool xslt_enabled; 77 bool xslt_enabled;
84 bool xss_auditor_enabled; 78 bool xss_auditor_enabled;
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 bool region_based_columns_enabled; 122 bool region_based_columns_enabled;
129 bool touch_enabled; 123 bool touch_enabled;
130 bool device_supports_touch; 124 bool device_supports_touch;
131 bool device_supports_mouse; 125 bool device_supports_mouse;
132 bool touch_adjustment_enabled; 126 bool touch_adjustment_enabled;
133 int pointer_events_max_touch_points; 127 int pointer_events_max_touch_points;
134 bool sync_xhr_in_documents_enabled; 128 bool sync_xhr_in_documents_enabled;
135 bool deferred_image_decoding_enabled; 129 bool deferred_image_decoding_enabled;
136 bool should_respect_image_orientation; 130 bool should_respect_image_orientation;
137 int number_of_cpu_cores; 131 int number_of_cpu_cores;
138 webkit_glue::EditingBehavior editing_behavior; 132 EditingBehavior editing_behavior;
139 bool supports_multiple_windows; 133 bool supports_multiple_windows;
140 bool viewport_enabled; 134 bool viewport_enabled;
141 bool viewport_meta_enabled; 135 bool viewport_meta_enabled;
142 bool main_frame_resizes_are_orientation_changes; 136 bool main_frame_resizes_are_orientation_changes;
143 bool initialize_at_minimum_page_scale; 137 bool initialize_at_minimum_page_scale;
144 bool smart_insert_delete_enabled; 138 bool smart_insert_delete_enabled;
145 bool spatial_navigation_enabled; 139 bool spatial_navigation_enabled;
146 bool pinch_virtual_viewport_enabled; 140 bool pinch_virtual_viewport_enabled;
147 int pinch_overlay_scrollbar_thickness; 141 int pinch_overlay_scrollbar_thickness;
148 bool use_solid_color_scrollbars; 142 bool use_solid_color_scrollbars;
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 bool report_screen_size_in_physical_pixels_quirk; 175 bool report_screen_size_in_physical_pixels_quirk;
182 #endif 176 #endif
183 177
184 // We try to keep the default values the same as the default values in 178 // We try to keep the default values the same as the default values in
185 // chrome, except for the cases where it would require lots of extra work for 179 // chrome, except for the cases where it would require lots of extra work for
186 // the embedder to use the same default value. 180 // the embedder to use the same default value.
187 WebPreferences(); 181 WebPreferences();
188 ~WebPreferences(); 182 ~WebPreferences();
189 }; 183 };
190 184
191 #endif // WEBKIT_COMMON_WEBPREFERENCES_H__ 185 } // namespace content
186
187 #endif // CONTENT_PUBLIC_COMMON_WEB_PREFERENCES_H_
OLDNEW
« no previous file with comments | « content/public/common/common_param_traits_macros.h ('k') | content/public/common/web_preferences.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698