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

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

Issue 694533010: [NOT FOR REVIEW] Working cpp enum example (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #ifndef CONTENT_PUBLIC_COMMON_WEB_PREFERENCES_H_ 5 #ifndef CONTENT_PUBLIC_COMMON_WEB_PREFERENCES_H_
6 #define CONTENT_PUBLIC_COMMON_WEB_PREFERENCES_H_ 6 #define CONTENT_PUBLIC_COMMON_WEB_PREFERENCES_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 29 matching lines...) Expand all
40 }; 40 };
41 41
42 enum V8ScriptStreamingMode { 42 enum V8ScriptStreamingMode {
43 V8_SCRIPT_STREAMING_MODE_ALL, 43 V8_SCRIPT_STREAMING_MODE_ALL,
44 V8_SCRIPT_STREAMING_MODE_ONLY_ASYNC_AND_DEFER, 44 V8_SCRIPT_STREAMING_MODE_ONLY_ASYNC_AND_DEFER,
45 V8_SCRIPT_STREAMING_MODE_ALL_PLUS_BLOCK_PARSER_BLOCKING, 45 V8_SCRIPT_STREAMING_MODE_ALL_PLUS_BLOCK_PARSER_BLOCKING,
46 V8_SCRIPT_STREAMING_MODE_LAST = 46 V8_SCRIPT_STREAMING_MODE_LAST =
47 V8_SCRIPT_STREAMING_MODE_ALL_PLUS_BLOCK_PARSER_BLOCKING 47 V8_SCRIPT_STREAMING_MODE_ALL_PLUS_BLOCK_PARSER_BLOCKING
48 }; 48 };
49 49
50 // Bit field values indicating what kind of pointer types are available. These
51 // enum must match blink::WebSettings::PointerType enums.
52 enum PointerType {
53 POINTER_TYPE_NONE = 1,
54 POINTER_TYPE_FIRST = POINTER_TYPE_NONE,
55 POINTER_TYPE_COARSE = 2,
56 POINTER_TYPE_FINE = 4,
57 POINTER_TYPE_LAST = POINTER_TYPE_FINE
58 };
59
60 // Bit field values indicating what kind of pointer types are available. These
61 // enums must match blink::WebSettings::HoverType enums.
62 enum HoverType {
63 HOVER_TYPE_NONE = 1,
64 HOVER_TYPE_FIRST = HOVER_TYPE_NONE,
65 // Indicates that the primary pointing system can hover, but it requires a
66 // significant action on the user’s part. e.g. hover on “long press”.
67 HOVER_TYPE_ON_DEMAND = 2,
68 HOVER_TYPE_HOVER = 4,
69 HOVER_TYPE_LAST = HOVER_TYPE_HOVER
70 };
71
50 // The ISO 15924 script code for undetermined script aka Common. It's the 72 // The ISO 15924 script code for undetermined script aka Common. It's the
51 // default used on WebKit's side to get/set a font setting when no script is 73 // default used on WebKit's side to get/set a font setting when no script is
52 // specified. 74 // specified.
53 CONTENT_EXPORT extern const char kCommonScript[]; 75 CONTENT_EXPORT extern const char kCommonScript[];
54 76
55 // A struct for managing blink's settings. 77 // A struct for managing blink's settings.
56 // 78 //
57 // Adding new values to this class probably involves updating 79 // Adding new values to this class probably involves updating
58 // blink::WebSettings, content/common/view_messages.h, browser/tab_contents/ 80 // blink::WebSettings, content/common/view_messages.h, browser/tab_contents/
59 // render_view_host_delegate_helper.cc, and browser/profiles/profile.cc. 81 // render_view_host_delegate_helper.cc, and browser/profiles/profile.cc.
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 bool text_blobs_enabled; 146 bool text_blobs_enabled;
125 bool allow_displaying_insecure_content; 147 bool allow_displaying_insecure_content;
126 bool allow_running_insecure_content; 148 bool allow_running_insecure_content;
127 bool password_echo_enabled; 149 bool password_echo_enabled;
128 bool should_print_backgrounds; 150 bool should_print_backgrounds;
129 bool should_clear_document_background; 151 bool should_clear_document_background;
130 bool enable_scroll_animator; 152 bool enable_scroll_animator;
131 bool css_variables_enabled; 153 bool css_variables_enabled;
132 bool region_based_columns_enabled; 154 bool region_based_columns_enabled;
133 bool touch_enabled; 155 bool touch_enabled;
156 // TODO(mustaq): Nuke when the new API is ready
134 bool device_supports_touch; 157 bool device_supports_touch;
158 // TODO(mustaq): Nuke when the new API is ready
135 bool device_supports_mouse; 159 bool device_supports_mouse;
136 bool touch_adjustment_enabled; 160 bool touch_adjustment_enabled;
137 int pointer_events_max_touch_points; 161 int pointer_events_max_touch_points;
162 int available_pointer_types;
163 PointerType primary_pointer_type;
164 int available_hover_types;
165 HoverType primary_hover_type;
138 bool sync_xhr_in_documents_enabled; 166 bool sync_xhr_in_documents_enabled;
139 bool deferred_image_decoding_enabled; 167 bool deferred_image_decoding_enabled;
140 bool image_color_profiles_enabled; 168 bool image_color_profiles_enabled;
141 bool should_respect_image_orientation; 169 bool should_respect_image_orientation;
142 int number_of_cpu_cores; 170 int number_of_cpu_cores;
143 EditingBehavior editing_behavior; 171 EditingBehavior editing_behavior;
144 bool supports_multiple_windows; 172 bool supports_multiple_windows;
145 bool viewport_enabled; 173 bool viewport_enabled;
146 bool viewport_meta_enabled; 174 bool viewport_meta_enabled;
147 bool main_frame_resizes_are_orientation_changes; 175 bool main_frame_resizes_are_orientation_changes;
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 // We try to keep the default values the same as the default values in 222 // We try to keep the default values the same as the default values in
195 // chrome, except for the cases where it would require lots of extra work for 223 // chrome, except for the cases where it would require lots of extra work for
196 // the embedder to use the same default value. 224 // the embedder to use the same default value.
197 WebPreferences(); 225 WebPreferences();
198 ~WebPreferences(); 226 ~WebPreferences();
199 }; 227 };
200 228
201 } // namespace content 229 } // namespace content
202 230
203 #endif // CONTENT_PUBLIC_COMMON_WEB_PREFERENCES_H_ 231 #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