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

Side by Side Diff: webkit/glue/webpreferences.h

Issue 16216007: split webkit/glue/webpreferences to common and renderer (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: new location for public/platform Created 7 years, 6 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
« no previous file with comments | « webkit/glue/webkit_glue.gypi ('k') | webkit/glue/webpreferences.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
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 // WebKit::WebSettings, content/common/view_messages.h, browser/tab_contents/
9 // render_view_host_delegate_helper.cc, and browser/profiles/profile.cc.
10
11 #ifndef WEBKIT_GLUE_WEBPREFERENCES_H__
12 #define WEBKIT_GLUE_WEBPREFERENCES_H__
13
14 #include <map>
15 #include <string>
16 #include <vector>
17
18 #include "base/string16.h"
19 #include "googleurl/src/gurl.h"
20 #include "webkit/glue/webkit_glue_export.h"
21
22 namespace WebKit {
23 class WebView;
24 }
25
26 struct WebPreferences;
27
28 namespace webkit_glue {
29
30 // Map of ISO 15924 four-letter script code to font family. For example,
31 // "Arab" to "My Arabic Font".
32 typedef std::map<std::string, base::string16> ScriptFontFamilyMap;
33
34 typedef std::vector<std::pair<std::string, std::string> >
35 WebInspectorPreferences;
36
37 enum EditingBehavior {
38 EDITING_BEHAVIOR_MAC,
39 EDITING_BEHAVIOR_WIN,
40 EDITING_BEHAVIOR_UNIX,
41 EDITING_BEHAVIOR_ANDROID
42 };
43
44
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
47 // specified.
48 WEBKIT_GLUE_EXPORT extern const char kCommonScript[];
49
50 WEBKIT_GLUE_EXPORT void ApplyWebPreferences(const WebPreferences& prefs,
51 WebKit::WebView* web_view);
52
53 } // namespace webkit_glue
54
55 struct WEBKIT_GLUE_EXPORT WebPreferences {
56 webkit_glue::ScriptFontFamilyMap standard_font_family_map;
57 webkit_glue::ScriptFontFamilyMap fixed_font_family_map;
58 webkit_glue::ScriptFontFamilyMap serif_font_family_map;
59 webkit_glue::ScriptFontFamilyMap sans_serif_font_family_map;
60 webkit_glue::ScriptFontFamilyMap cursive_font_family_map;
61 webkit_glue::ScriptFontFamilyMap fantasy_font_family_map;
62 webkit_glue::ScriptFontFamilyMap pictograph_font_family_map;
63 int default_font_size;
64 int default_fixed_font_size;
65 int minimum_font_size;
66 int minimum_logical_font_size;
67 std::string default_encoding;
68 bool javascript_enabled;
69 bool web_security_enabled;
70 bool javascript_can_open_windows_automatically;
71 bool loads_images_automatically;
72 bool images_enabled;
73 bool plugins_enabled;
74 bool dom_paste_enabled;
75 webkit_glue::WebInspectorPreferences inspector_settings;
76 bool site_specific_quirks_enabled;
77 bool shrinks_standalone_images_to_fit;
78 bool uses_universal_detector;
79 bool text_areas_are_resizable;
80 bool java_enabled;
81 bool allow_scripts_to_close_windows;
82 bool remote_fonts_enabled;
83 bool javascript_can_access_clipboard;
84 bool xss_auditor_enabled;
85 // We don't use dns_prefetching_enabled to disable DNS prefetching. Instead,
86 // we disable the feature at a lower layer so that we catch non-WebKit uses
87 // of DNS prefetch as well.
88 bool dns_prefetching_enabled;
89 bool local_storage_enabled;
90 bool databases_enabled;
91 bool application_cache_enabled;
92 bool tabs_to_links;
93 bool caret_browsing_enabled;
94 bool hyperlink_auditing_enabled;
95 bool is_online;
96 bool user_style_sheet_enabled;
97 GURL user_style_sheet_location;
98 bool author_and_user_styles_enabled;
99 bool allow_universal_access_from_file_urls;
100 bool allow_file_access_from_file_urls;
101 bool webaudio_enabled;
102 bool experimental_webgl_enabled;
103 bool flash_3d_enabled;
104 bool flash_stage3d_enabled;
105 bool flash_stage3d_baseline_enabled;
106 bool gl_multisampling_enabled;
107 bool privileged_webgl_extensions_enabled;
108 bool webgl_errors_to_console_enabled;
109 bool accelerated_compositing_for_overflow_scroll_enabled;
110 bool accelerated_compositing_for_scrollable_frames_enabled;
111 bool composited_scrolling_for_frames_enabled;
112 bool mock_scrollbars_enabled;
113 bool threaded_html_parser;
114 bool show_paint_rects;
115 bool asynchronous_spell_checking_enabled;
116 bool unified_textchecker_enabled;
117 bool accelerated_compositing_enabled;
118 bool force_compositing_mode;
119 bool accelerated_compositing_for_3d_transforms_enabled;
120 bool accelerated_compositing_for_animation_enabled;
121 bool accelerated_compositing_for_video_enabled;
122 bool accelerated_2d_canvas_enabled;
123 int minimum_accelerated_2d_canvas_size;
124 bool antialiased_2d_canvas_disabled;
125 bool accelerated_filters_enabled;
126 bool gesture_tap_highlight_enabled;
127 bool accelerated_compositing_for_plugins_enabled;
128 bool memory_info_enabled;
129 bool fullscreen_enabled;
130 bool allow_displaying_insecure_content;
131 bool allow_running_insecure_content;
132 bool password_echo_enabled;
133 bool should_print_backgrounds;
134 bool enable_scroll_animator;
135 bool visual_word_movement_enabled;
136 bool css_sticky_position_enabled;
137 bool css_shaders_enabled;
138 bool css_variables_enabled;
139 bool css_grid_layout_enabled;
140 bool lazy_layout_enabled;
141 bool touch_enabled;
142 bool device_supports_touch;
143 bool device_supports_mouse;
144 bool touch_adjustment_enabled;
145 bool fixed_position_creates_stacking_context;
146 bool sync_xhr_in_documents_enabled;
147 bool deferred_image_decoding_enabled;
148 bool should_respect_image_orientation;
149 int number_of_cpu_cores;
150 webkit_glue::EditingBehavior editing_behavior;
151 bool supports_multiple_windows;
152 bool viewport_enabled;
153 bool initialize_at_minimum_page_scale;
154 bool smart_insert_delete_enabled;
155 bool spatial_navigation_enabled;
156 bool experimental_websocket_enabled;
157 bool pinch_virtual_viewport_enabled;
158
159 // This flags corresponds to a Page's Settings' setCookieEnabled state. It
160 // only controls whether or not the "document.cookie" field is properly
161 // connected to the backing store, for instance if you wanted to be able to
162 // define custom getters and setters from within a unique security content
163 // without raising a DOM security exception.
164 bool cookie_enabled;
165
166 #if defined(OS_ANDROID)
167 bool text_autosizing_enabled;
168 float font_scale_factor;
169 bool force_enable_zoom;
170 bool double_tap_to_zoom_enabled;
171 bool user_gesture_required_for_media_playback;
172 GURL default_video_poster_url;
173 bool support_deprecated_target_density_dpi;
174 bool use_wide_viewport;
175 #endif
176
177 // We try to keep the default values the same as the default values in
178 // chrome, except for the cases where it would require lots of extra work for
179 // the embedder to use the same default value.
180 WebPreferences();
181 ~WebPreferences();
182 };
183
184 #endif // WEBKIT_GLUE_WEBPREFERENCES_H__
OLDNEW
« no previous file with comments | « webkit/glue/webkit_glue.gypi ('k') | webkit/glue/webpreferences.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698