common_param_traits_macros.h revision 5f1c94371a64b3196d4be9466099bb892df9b88e
1cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles)// Copyright (c) 2012 The Chromium Authors. All rights reserved.
2cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles)// Use of this source code is governed by a BSD-style license that can be
3cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles)// found in the LICENSE file.
4cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles)
5cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles)// Singly or Multiply-included shared traits file depending on circumstances.
6cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles)// This allows the use of IPC serialization macros in more than one IPC message
7cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles)// file.
8cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles)#ifndef CONTENT_PUBLIC_COMMON_COMMON_PARAM_TRAITS_MACROS_H_
9cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles)#define CONTENT_PUBLIC_COMMON_COMMON_PARAM_TRAITS_MACROS_H_
10cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles)
11cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles)#include "content/public/common/console_message_level.h"
12116680a4aac90f2aa7413d9095a592090648e557Ben Murdoch#include "content/public/common/page_transition_types.h"
13cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles)#include "content/public/common/referrer.h"
14cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles)#include "content/public/common/security_style.h"
15cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles)#include "content/public/common/ssl_status.h"
16cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles)#include "content/public/common/web_preferences.h"
17cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles)#include "content/public/common/webplugininfo.h"
18cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles)#include "ipc/ipc_message_macros.h"
19cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles)#include "net/base/network_change_notifier.h"
20cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles)#include "net/base/request_priority.h"
21cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles)#include "third_party/WebKit/public/platform/WebPoint.h"
22cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles)#include "third_party/WebKit/public/platform/WebRect.h"
23cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles)#include "third_party/WebKit/public/platform/WebReferrerPolicy.h"
24cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles)#include "third_party/WebKit/public/platform/WebURLRequest.h"
25cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles)#include "third_party/WebKit/public/web/WebWindowFeatures.h"
26cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles)#include "ui/base/window_open_disposition.h"
27cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles)
28cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles)#undef IPC_MESSAGE_EXPORT
29cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles)#define IPC_MESSAGE_EXPORT CONTENT_EXPORT
30cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles)
31cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles)IPC_ENUM_TRAITS(content::PageTransition)  // Bitmask.
32cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles)IPC_ENUM_TRAITS_MAX_VALUE(net::NetworkChangeNotifier::ConnectionType,
33cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles)                          net::NetworkChangeNotifier::CONNECTION_LAST)
34cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles)IPC_ENUM_TRAITS_MAX_VALUE(content::ConsoleMessageLevel,
35cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles)                          content::CONSOLE_MESSAGE_LEVEL_LAST)
36cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles)IPC_ENUM_TRAITS_MAX_VALUE(content::SecurityStyle,
37cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles)                          content::SECURITY_STYLE_LAST)
38cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles)IPC_ENUM_TRAITS_MAX_VALUE(blink::WebReferrerPolicy,
39cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles)                          blink::WebReferrerPolicyLast)
40cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles)IPC_ENUM_TRAITS_MAX_VALUE(content::EditingBehavior,
41cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles)                          content::EDITING_BEHAVIOR_LAST)
42cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles)IPC_ENUM_TRAITS_MAX_VALUE(WindowOpenDisposition,
43cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles)                          WINDOW_OPEN_DISPOSITION_LAST)
44cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles)IPC_ENUM_TRAITS_MAX_VALUE(net::RequestPriority, net::MAXIMUM_PRIORITY)
45cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles)
46cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles)IPC_STRUCT_TRAITS_BEGIN(blink::WebPoint)
47cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles)  IPC_STRUCT_TRAITS_MEMBER(x)
48cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles)  IPC_STRUCT_TRAITS_MEMBER(y)
49cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles)IPC_STRUCT_TRAITS_END()
50cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles)
51cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles)IPC_STRUCT_TRAITS_BEGIN(blink::WebRect)
52cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles)  IPC_STRUCT_TRAITS_MEMBER(x)
53cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles)  IPC_STRUCT_TRAITS_MEMBER(y)
54cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles)  IPC_STRUCT_TRAITS_MEMBER(width)
55cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles)  IPC_STRUCT_TRAITS_MEMBER(height)
56cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles)IPC_STRUCT_TRAITS_END()
57116680a4aac90f2aa7413d9095a592090648e557Ben Murdoch
58cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles)IPC_STRUCT_TRAITS_BEGIN(content::Referrer)
59cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles)  IPC_STRUCT_TRAITS_MEMBER(url)
60cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles)  IPC_STRUCT_TRAITS_MEMBER(policy)
61cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles)IPC_STRUCT_TRAITS_END()
62cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles)
63cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles)IPC_STRUCT_TRAITS_BEGIN(content::SSLStatus)
64cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles)  IPC_STRUCT_TRAITS_MEMBER(security_style)
65cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles)  IPC_STRUCT_TRAITS_MEMBER(cert_id)
66cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles)  IPC_STRUCT_TRAITS_MEMBER(cert_status)
67cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles)  IPC_STRUCT_TRAITS_MEMBER(security_bits)
68cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles)  IPC_STRUCT_TRAITS_MEMBER(connection_status)
69cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles)  IPC_STRUCT_TRAITS_MEMBER(content_status)
70cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles)IPC_STRUCT_TRAITS_END()
71cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles)
72cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles)IPC_STRUCT_TRAITS_BEGIN(content::WebPluginMimeType)
73cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles)  IPC_STRUCT_TRAITS_MEMBER(mime_type)
74cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles)  IPC_STRUCT_TRAITS_MEMBER(file_extensions)
75cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles)  IPC_STRUCT_TRAITS_MEMBER(description)
76cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles)  IPC_STRUCT_TRAITS_MEMBER(additional_param_names)
77cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles)  IPC_STRUCT_TRAITS_MEMBER(additional_param_values)
78cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles)IPC_STRUCT_TRAITS_END()
79cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles)
80cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles)IPC_STRUCT_TRAITS_BEGIN(content::WebPluginInfo)
81cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles)  IPC_STRUCT_TRAITS_MEMBER(name)
82cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles)  IPC_STRUCT_TRAITS_MEMBER(path)
83cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles)  IPC_STRUCT_TRAITS_MEMBER(version)
84cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles)  IPC_STRUCT_TRAITS_MEMBER(desc)
85cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles)  IPC_STRUCT_TRAITS_MEMBER(mime_types)
86cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles)  IPC_STRUCT_TRAITS_MEMBER(type)
87  IPC_STRUCT_TRAITS_MEMBER(pepper_permissions)
88IPC_STRUCT_TRAITS_END()
89
90IPC_STRUCT_TRAITS_BEGIN(content::WebPreferences)
91  IPC_STRUCT_TRAITS_MEMBER(standard_font_family_map)
92  IPC_STRUCT_TRAITS_MEMBER(fixed_font_family_map)
93  IPC_STRUCT_TRAITS_MEMBER(serif_font_family_map)
94  IPC_STRUCT_TRAITS_MEMBER(sans_serif_font_family_map)
95  IPC_STRUCT_TRAITS_MEMBER(cursive_font_family_map)
96  IPC_STRUCT_TRAITS_MEMBER(fantasy_font_family_map)
97  IPC_STRUCT_TRAITS_MEMBER(default_font_size)
98  IPC_STRUCT_TRAITS_MEMBER(default_fixed_font_size)
99  IPC_STRUCT_TRAITS_MEMBER(minimum_font_size)
100  IPC_STRUCT_TRAITS_MEMBER(minimum_logical_font_size)
101  IPC_STRUCT_TRAITS_MEMBER(default_encoding)
102  IPC_STRUCT_TRAITS_MEMBER(javascript_enabled)
103  IPC_STRUCT_TRAITS_MEMBER(web_security_enabled)
104  IPC_STRUCT_TRAITS_MEMBER(javascript_can_open_windows_automatically)
105  IPC_STRUCT_TRAITS_MEMBER(loads_images_automatically)
106  IPC_STRUCT_TRAITS_MEMBER(images_enabled)
107  IPC_STRUCT_TRAITS_MEMBER(plugins_enabled)
108  IPC_STRUCT_TRAITS_MEMBER(dom_paste_enabled)
109  IPC_STRUCT_TRAITS_MEMBER(inspector_settings)
110  IPC_STRUCT_TRAITS_MEMBER(site_specific_quirks_enabled)
111  IPC_STRUCT_TRAITS_MEMBER(shrinks_standalone_images_to_fit)
112  IPC_STRUCT_TRAITS_MEMBER(uses_universal_detector)
113  IPC_STRUCT_TRAITS_MEMBER(text_areas_are_resizable)
114  IPC_STRUCT_TRAITS_MEMBER(java_enabled)
115  IPC_STRUCT_TRAITS_MEMBER(allow_scripts_to_close_windows)
116  IPC_STRUCT_TRAITS_MEMBER(remote_fonts_enabled)
117  IPC_STRUCT_TRAITS_MEMBER(javascript_can_access_clipboard)
118  IPC_STRUCT_TRAITS_MEMBER(xslt_enabled)
119  IPC_STRUCT_TRAITS_MEMBER(xss_auditor_enabled)
120  IPC_STRUCT_TRAITS_MEMBER(dns_prefetching_enabled)
121  IPC_STRUCT_TRAITS_MEMBER(local_storage_enabled)
122  IPC_STRUCT_TRAITS_MEMBER(databases_enabled)
123  IPC_STRUCT_TRAITS_MEMBER(application_cache_enabled)
124  IPC_STRUCT_TRAITS_MEMBER(tabs_to_links)
125  IPC_STRUCT_TRAITS_MEMBER(hyperlink_auditing_enabled)
126  IPC_STRUCT_TRAITS_MEMBER(is_online)
127  IPC_STRUCT_TRAITS_MEMBER(connection_type)
128  IPC_STRUCT_TRAITS_MEMBER(allow_universal_access_from_file_urls)
129  IPC_STRUCT_TRAITS_MEMBER(allow_file_access_from_file_urls)
130  IPC_STRUCT_TRAITS_MEMBER(webaudio_enabled)
131  IPC_STRUCT_TRAITS_MEMBER(experimental_webgl_enabled)
132  IPC_STRUCT_TRAITS_MEMBER(pepper_3d_enabled)
133  IPC_STRUCT_TRAITS_MEMBER(pinch_virtual_viewport_enabled)
134  IPC_STRUCT_TRAITS_MEMBER(pinch_overlay_scrollbar_thickness)
135  IPC_STRUCT_TRAITS_MEMBER(use_solid_color_scrollbars)
136  IPC_STRUCT_TRAITS_MEMBER(flash_3d_enabled)
137  IPC_STRUCT_TRAITS_MEMBER(flash_stage3d_enabled)
138  IPC_STRUCT_TRAITS_MEMBER(flash_stage3d_baseline_enabled)
139  IPC_STRUCT_TRAITS_MEMBER(gl_multisampling_enabled)
140  IPC_STRUCT_TRAITS_MEMBER(privileged_webgl_extensions_enabled)
141  IPC_STRUCT_TRAITS_MEMBER(webgl_errors_to_console_enabled)
142  IPC_STRUCT_TRAITS_MEMBER(mock_scrollbars_enabled)
143  IPC_STRUCT_TRAITS_MEMBER(layer_squashing_enabled)
144  IPC_STRUCT_TRAITS_MEMBER(asynchronous_spell_checking_enabled)
145  IPC_STRUCT_TRAITS_MEMBER(unified_textchecker_enabled)
146  IPC_STRUCT_TRAITS_MEMBER(accelerated_2d_canvas_enabled)
147  IPC_STRUCT_TRAITS_MEMBER(minimum_accelerated_2d_canvas_size)
148  IPC_STRUCT_TRAITS_MEMBER(antialiased_2d_canvas_disabled)
149  IPC_STRUCT_TRAITS_MEMBER(accelerated_2d_canvas_msaa_sample_count)
150  IPC_STRUCT_TRAITS_MEMBER(accelerated_filters_enabled)
151  IPC_STRUCT_TRAITS_MEMBER(deferred_filters_enabled)
152  IPC_STRUCT_TRAITS_MEMBER(container_culling_enabled)
153  IPC_STRUCT_TRAITS_MEMBER(allow_displaying_insecure_content)
154  IPC_STRUCT_TRAITS_MEMBER(allow_running_insecure_content)
155  IPC_STRUCT_TRAITS_MEMBER(enable_scroll_animator)
156  IPC_STRUCT_TRAITS_MEMBER(password_echo_enabled)
157  IPC_STRUCT_TRAITS_MEMBER(should_clear_document_background)
158  IPC_STRUCT_TRAITS_MEMBER(region_based_columns_enabled)
159  IPC_STRUCT_TRAITS_MEMBER(touch_enabled)
160  IPC_STRUCT_TRAITS_MEMBER(device_supports_touch)
161  IPC_STRUCT_TRAITS_MEMBER(device_supports_mouse)
162  IPC_STRUCT_TRAITS_MEMBER(touch_adjustment_enabled)
163  IPC_STRUCT_TRAITS_MEMBER(pointer_events_max_touch_points)
164  IPC_STRUCT_TRAITS_MEMBER(sync_xhr_in_documents_enabled)
165  IPC_STRUCT_TRAITS_MEMBER(deferred_image_decoding_enabled)
166  IPC_STRUCT_TRAITS_MEMBER(should_respect_image_orientation)
167  IPC_STRUCT_TRAITS_MEMBER(number_of_cpu_cores)
168  IPC_STRUCT_TRAITS_MEMBER(editing_behavior)
169  IPC_STRUCT_TRAITS_MEMBER(supports_multiple_windows)
170  IPC_STRUCT_TRAITS_MEMBER(viewport_enabled)
171  IPC_STRUCT_TRAITS_MEMBER(viewport_meta_enabled)
172  IPC_STRUCT_TRAITS_MEMBER(use_expanded_heuristics_for_gpu_rasterization)
173  IPC_STRUCT_TRAITS_MEMBER(main_frame_resizes_are_orientation_changes)
174  IPC_STRUCT_TRAITS_MEMBER(initialize_at_minimum_page_scale)
175  IPC_STRUCT_TRAITS_MEMBER(smart_insert_delete_enabled)
176  IPC_STRUCT_TRAITS_MEMBER(cookie_enabled)
177  IPC_STRUCT_TRAITS_MEMBER(navigate_on_drag_drop)
178  IPC_STRUCT_TRAITS_MEMBER(spatial_navigation_enabled)
179  IPC_STRUCT_TRAITS_MEMBER(pepper_accelerated_video_decode_enabled)
180#if defined(OS_ANDROID)
181  IPC_STRUCT_TRAITS_MEMBER(text_autosizing_enabled)
182  IPC_STRUCT_TRAITS_MEMBER(font_scale_factor)
183  IPC_STRUCT_TRAITS_MEMBER(device_scale_adjustment)
184  IPC_STRUCT_TRAITS_MEMBER(force_enable_zoom)
185  IPC_STRUCT_TRAITS_MEMBER(disallow_fullscreen_for_non_media_elements)
186  IPC_STRUCT_TRAITS_MEMBER(double_tap_to_zoom_enabled)
187  IPC_STRUCT_TRAITS_MEMBER(user_gesture_required_for_media_playback)
188  IPC_STRUCT_TRAITS_MEMBER(default_video_poster_url)
189  IPC_STRUCT_TRAITS_MEMBER(support_deprecated_target_density_dpi)
190  IPC_STRUCT_TRAITS_MEMBER(use_legacy_background_size_shorthand_behavior)
191  IPC_STRUCT_TRAITS_MEMBER(wide_viewport_quirk)
192  IPC_STRUCT_TRAITS_MEMBER(use_wide_viewport)
193  IPC_STRUCT_TRAITS_MEMBER(viewport_meta_layout_size_quirk)
194  IPC_STRUCT_TRAITS_MEMBER(viewport_meta_merge_content_quirk)
195  IPC_STRUCT_TRAITS_MEMBER(viewport_meta_non_user_scalable_quirk)
196  IPC_STRUCT_TRAITS_MEMBER(viewport_meta_zero_values_quirk)
197  IPC_STRUCT_TRAITS_MEMBER(clobber_user_agent_initial_scale_quirk)
198  IPC_STRUCT_TRAITS_MEMBER(ignore_main_frame_overflow_hidden_quirk)
199  IPC_STRUCT_TRAITS_MEMBER(report_screen_size_in_physical_pixels_quirk)
200#endif
201IPC_STRUCT_TRAITS_END()
202
203IPC_STRUCT_TRAITS_BEGIN(blink::WebWindowFeatures)
204  IPC_STRUCT_TRAITS_MEMBER(x)
205  IPC_STRUCT_TRAITS_MEMBER(xSet)
206  IPC_STRUCT_TRAITS_MEMBER(y)
207  IPC_STRUCT_TRAITS_MEMBER(ySet)
208  IPC_STRUCT_TRAITS_MEMBER(width)
209  IPC_STRUCT_TRAITS_MEMBER(widthSet)
210  IPC_STRUCT_TRAITS_MEMBER(height)
211  IPC_STRUCT_TRAITS_MEMBER(heightSet)
212  IPC_STRUCT_TRAITS_MEMBER(menuBarVisible)
213  IPC_STRUCT_TRAITS_MEMBER(statusBarVisible)
214  IPC_STRUCT_TRAITS_MEMBER(toolBarVisible)
215  IPC_STRUCT_TRAITS_MEMBER(locationBarVisible)
216  IPC_STRUCT_TRAITS_MEMBER(scrollbarsVisible)
217  IPC_STRUCT_TRAITS_MEMBER(resizable)
218  IPC_STRUCT_TRAITS_MEMBER(fullscreen)
219  IPC_STRUCT_TRAITS_MEMBER(dialog)
220IPC_STRUCT_TRAITS_END()
221
222#endif  // CONTENT_PUBLIC_COMMON_COMMON_PARAM_TRAITS_MACROS_H_
223