Update To 11.40.268.0
[platform/framework/web/crosswalk.git] / src / ppapi / proxy / ppapi_messages.h
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 // Multiply-included message header, no traditional include guard.
6 #include <map>
7 #include <string>
8 #include <vector>
9
10 #include "base/basictypes.h"
11 #include "base/files/file_path.h"
12 #include "base/memory/shared_memory.h"
13 #include "base/process/process.h"
14 #include "base/strings/string16.h"
15 #include "base/sync_socket.h"
16 #include "gpu/command_buffer/common/command_buffer.h"
17 #include "gpu/command_buffer/common/mailbox.h"
18 #include "gpu/ipc/gpu_command_buffer_traits.h"
19 #include "ipc/ipc_channel_handle.h"
20 #include "ipc/ipc_message_macros.h"
21 #include "ipc/ipc_message_utils.h"
22 #include "ipc/ipc_platform_file.h"
23 #include "ppapi/c/dev/pp_video_capture_dev.h"
24 #include "ppapi/c/dev/pp_video_dev.h"
25 #include "ppapi/c/dev/ppb_truetype_font_dev.h"
26 #include "ppapi/c/dev/ppb_url_util_dev.h"
27 #include "ppapi/c/dev/ppp_printing_dev.h"
28 #include "ppapi/c/pp_bool.h"
29 #include "ppapi/c/pp_codecs.h"
30 #include "ppapi/c/pp_file_info.h"
31 #include "ppapi/c/pp_instance.h"
32 #include "ppapi/c/pp_module.h"
33 #include "ppapi/c/pp_point.h"
34 #include "ppapi/c/pp_rect.h"
35 #include "ppapi/c/pp_resource.h"
36 #include "ppapi/c/pp_size.h"
37 #include "ppapi/c/pp_time.h"
38 #include "ppapi/c/ppb_audio_config.h"
39 #include "ppapi/c/ppb_compositor_layer.h"
40 #include "ppapi/c/ppb_image_data.h"
41 #include "ppapi/c/ppb_tcp_socket.h"
42 #include "ppapi/c/ppb_text_input_controller.h"
43 #include "ppapi/c/ppb_udp_socket.h"
44 #include "ppapi/c/private/pp_content_decryptor.h"
45 #include "ppapi/c/private/pp_private_font_charset.h"
46 #include "ppapi/c/private/ppb_flash.h"
47 #include "ppapi/c/private/ppb_host_resolver_private.h"
48 #include "ppapi/c/private/ppb_isolated_file_system_private.h"
49 #include "ppapi/c/private/ppb_net_address_private.h"
50 #include "ppapi/c/private/ppb_pdf.h"
51 #include "ppapi/c/private/ppb_talk_private.h"
52 #include "ppapi/c/private/ppp_flash_browser_operations.h"
53 #include "ppapi/proxy/host_resolver_private_resource.h"
54 #include "ppapi/proxy/network_list_resource.h"
55 #include "ppapi/proxy/ppapi_param_traits.h"
56 #include "ppapi/proxy/ppapi_proxy_export.h"
57 #include "ppapi/proxy/resource_message_params.h"
58 #include "ppapi/proxy/serialized_flash_menu.h"
59 #include "ppapi/proxy/serialized_handle.h"
60 #include "ppapi/proxy/serialized_structs.h"
61 #include "ppapi/proxy/serialized_var.h"
62 #include "ppapi/shared_impl/compositor_layer_data.h"
63 #include "ppapi/shared_impl/dir_contents.h"
64 #include "ppapi/shared_impl/file_growth.h"
65 #include "ppapi/shared_impl/file_path.h"
66 #include "ppapi/shared_impl/file_ref_create_info.h"
67 #include "ppapi/shared_impl/media_stream_audio_track_shared.h"
68 #include "ppapi/shared_impl/media_stream_video_track_shared.h"
69 #include "ppapi/shared_impl/ppapi_nacl_plugin_args.h"
70 #include "ppapi/shared_impl/ppapi_preferences.h"
71 #include "ppapi/shared_impl/ppb_device_ref_shared.h"
72 #include "ppapi/shared_impl/ppb_input_event_shared.h"
73 #include "ppapi/shared_impl/ppb_tcp_socket_shared.h"
74 #include "ppapi/shared_impl/ppb_view_shared.h"
75 #include "ppapi/shared_impl/ppp_flash_browser_operations_shared.h"
76 #include "ppapi/shared_impl/private/ppb_x509_certificate_private_shared.h"
77 #include "ppapi/shared_impl/socket_option_data.h"
78 #include "ppapi/shared_impl/url_request_info_data.h"
79 #include "ppapi/shared_impl/url_response_info_data.h"
80 #include "ui/events/ipc/latency_info_param_traits.h"
81
82 #undef IPC_MESSAGE_EXPORT
83 #define IPC_MESSAGE_EXPORT PPAPI_PROXY_EXPORT
84
85 #define IPC_MESSAGE_START PpapiMsgStart
86
87 IPC_ENUM_TRAITS_MAX_VALUE(ppapi::TCPSocketVersion,
88                           ppapi::TCP_SOCKET_VERSION_1_1_OR_ABOVE)
89 IPC_ENUM_TRAITS(PP_AudioSampleRate)
90 IPC_ENUM_TRAITS_MAX_VALUE(PP_BlendMode, PP_BLENDMODE_LAST)
91 IPC_ENUM_TRAITS(PP_DeviceType_Dev)
92 IPC_ENUM_TRAITS(PP_DecryptorStreamType)
93 IPC_ENUM_TRAITS(PP_SessionType)
94 IPC_ENUM_TRAITS(PP_CdmExceptionCode)
95 IPC_ENUM_TRAITS_MAX_VALUE(PP_FileSystemType, PP_FILESYSTEMTYPE_ISOLATED)
96 IPC_ENUM_TRAITS_MAX_VALUE(PP_FileType, PP_FILETYPE_OTHER)
97 IPC_ENUM_TRAITS(PP_Flash_BrowserOperations_Permission)
98 IPC_ENUM_TRAITS(PP_Flash_BrowserOperations_SettingType)
99 IPC_ENUM_TRAITS(PP_FlashSetting)
100 IPC_ENUM_TRAITS(PP_ImageDataFormat)
101 IPC_ENUM_TRAITS(PP_InputEvent_MouseButton)
102 IPC_ENUM_TRAITS(PP_InputEvent_Type)
103 IPC_ENUM_TRAITS_MAX_VALUE(PP_IsolatedFileSystemType_Private,
104                           PP_ISOLATEDFILESYSTEMTYPE_PRIVATE_PLUGINPRIVATE)
105 IPC_ENUM_TRAITS_MAX_VALUE(PP_NetAddressFamily_Private,
106                           PP_NETADDRESSFAMILY_PRIVATE_IPV6)
107 IPC_ENUM_TRAITS_MAX_VALUE(PP_NetworkList_State, PP_NETWORKLIST_STATE_UP)
108 IPC_ENUM_TRAITS_MAX_VALUE(PP_NetworkList_Type, PP_NETWORKLIST_TYPE_CELLULAR)
109 IPC_ENUM_TRAITS(PP_PrintOrientation_Dev)
110 IPC_ENUM_TRAITS(PP_PrintOutputFormat_Dev)
111 IPC_ENUM_TRAITS(PP_PrintScalingOption_Dev)
112 IPC_ENUM_TRAITS(PP_PrivateFontCharset)
113 IPC_ENUM_TRAITS(PP_ResourceImage)
114 IPC_ENUM_TRAITS(PP_ResourceString)
115 IPC_ENUM_TRAITS_MAX_VALUE(PP_TalkEvent, PP_TALKEVENT_NUM_EVENTS - 1)
116 IPC_ENUM_TRAITS_MAX_VALUE(PP_TalkPermission,
117                           PP_TALKPERMISSION_NUM_PERMISSIONS - 1)
118 IPC_ENUM_TRAITS_MAX_VALUE(PP_TCPSocket_Option,
119                           PP_TCPSOCKET_OPTION_RECV_BUFFER_SIZE)
120 IPC_ENUM_TRAITS(PP_TextInput_Type)
121 IPC_ENUM_TRAITS(PP_TrueTypeFontFamily_Dev)
122 IPC_ENUM_TRAITS(PP_TrueTypeFontStyle_Dev)
123 IPC_ENUM_TRAITS(PP_TrueTypeFontWeight_Dev)
124 IPC_ENUM_TRAITS(PP_TrueTypeFontWidth_Dev)
125 IPC_ENUM_TRAITS(PP_TrueTypeFontCharset_Dev)
126 IPC_ENUM_TRAITS_MAX_VALUE(PP_UDPSocket_Option,
127                           PP_UDPSOCKET_OPTION_RECV_BUFFER_SIZE)
128 IPC_ENUM_TRAITS(PP_VideoDecodeError_Dev)
129 IPC_ENUM_TRAITS(PP_VideoDecoder_Profile)
130 IPC_ENUM_TRAITS_MAX_VALUE(PP_VideoFrame_Format, PP_VIDEOFRAME_FORMAT_LAST)
131 IPC_ENUM_TRAITS_MAX_VALUE(PP_HardwareAcceleration, PP_HARDWAREACCELERATION_LAST)
132 IPC_ENUM_TRAITS_MAX_VALUE(PP_VideoProfile, PP_VIDEOPROFILE_MAX)
133
134 IPC_STRUCT_TRAITS_BEGIN(PP_Point)
135   IPC_STRUCT_TRAITS_MEMBER(x)
136   IPC_STRUCT_TRAITS_MEMBER(y)
137 IPC_STRUCT_TRAITS_END()
138
139 IPC_STRUCT_TRAITS_BEGIN(PP_FloatPoint)
140   IPC_STRUCT_TRAITS_MEMBER(x)
141   IPC_STRUCT_TRAITS_MEMBER(y)
142 IPC_STRUCT_TRAITS_END()
143
144 IPC_STRUCT_TRAITS_BEGIN(PP_Size)
145   IPC_STRUCT_TRAITS_MEMBER(height)
146   IPC_STRUCT_TRAITS_MEMBER(width)
147 IPC_STRUCT_TRAITS_END()
148
149 IPC_STRUCT_TRAITS_BEGIN(PP_FloatSize)
150   IPC_STRUCT_TRAITS_MEMBER(height)
151   IPC_STRUCT_TRAITS_MEMBER(width)
152 IPC_STRUCT_TRAITS_END()
153
154 IPC_STRUCT_TRAITS_BEGIN(PP_Rect)
155   IPC_STRUCT_TRAITS_MEMBER(point)
156   IPC_STRUCT_TRAITS_MEMBER(size)
157 IPC_STRUCT_TRAITS_END()
158
159 IPC_STRUCT_TRAITS_BEGIN(PP_FloatRect)
160   IPC_STRUCT_TRAITS_MEMBER(point)
161   IPC_STRUCT_TRAITS_MEMBER(size)
162 IPC_STRUCT_TRAITS_END()
163
164 IPC_STRUCT_TRAITS_BEGIN(PP_ImageDataDesc)
165   IPC_STRUCT_TRAITS_MEMBER(format)
166   IPC_STRUCT_TRAITS_MEMBER(size)
167   IPC_STRUCT_TRAITS_MEMBER(stride)
168 IPC_STRUCT_TRAITS_END()
169
170 IPC_STRUCT_TRAITS_BEGIN(PP_PictureBuffer_Dev)
171   IPC_STRUCT_TRAITS_MEMBER(id)
172   IPC_STRUCT_TRAITS_MEMBER(size)
173   IPC_STRUCT_TRAITS_MEMBER(texture_id)
174 IPC_STRUCT_TRAITS_END()
175
176 IPC_STRUCT_TRAITS_BEGIN(PP_Picture_Dev)
177   IPC_STRUCT_TRAITS_MEMBER(picture_buffer_id)
178   IPC_STRUCT_TRAITS_MEMBER(bitstream_buffer_id)
179 IPC_STRUCT_TRAITS_END()
180
181 IPC_STRUCT_TRAITS_BEGIN(PP_PrintPageNumberRange_Dev)
182   IPC_STRUCT_TRAITS_MEMBER(first_page_number)
183   IPC_STRUCT_TRAITS_MEMBER(last_page_number)
184 IPC_STRUCT_TRAITS_END()
185
186 IPC_STRUCT_TRAITS_BEGIN(PP_VideoCaptureDeviceInfo_Dev)
187   IPC_STRUCT_TRAITS_MEMBER(width)
188   IPC_STRUCT_TRAITS_MEMBER(height)
189   IPC_STRUCT_TRAITS_MEMBER(frames_per_second)
190 IPC_STRUCT_TRAITS_END()
191
192 IPC_STRUCT_TRAITS_BEGIN(PP_HostResolver_Private_Hint)
193   IPC_STRUCT_TRAITS_MEMBER(family)
194   IPC_STRUCT_TRAITS_MEMBER(flags)
195 IPC_STRUCT_TRAITS_END()
196
197 IPC_STRUCT_TRAITS_BEGIN(PP_PrintSettings_Dev)
198   IPC_STRUCT_TRAITS_MEMBER(printable_area)
199   IPC_STRUCT_TRAITS_MEMBER(content_area)
200   IPC_STRUCT_TRAITS_MEMBER(paper_size)
201   IPC_STRUCT_TRAITS_MEMBER(dpi)
202   IPC_STRUCT_TRAITS_MEMBER(orientation)
203   IPC_STRUCT_TRAITS_MEMBER(print_scaling_option)
204   IPC_STRUCT_TRAITS_MEMBER(grayscale)
205   IPC_STRUCT_TRAITS_MEMBER(format)
206 IPC_STRUCT_TRAITS_END()
207
208 IPC_STRUCT_TRAITS_BEGIN(PP_URLComponent_Dev)
209   IPC_STRUCT_TRAITS_MEMBER(begin)
210   IPC_STRUCT_TRAITS_MEMBER(len)
211 IPC_STRUCT_TRAITS_END()
212
213 IPC_STRUCT_TRAITS_BEGIN(PP_URLComponents_Dev)
214   IPC_STRUCT_TRAITS_MEMBER(scheme)
215   IPC_STRUCT_TRAITS_MEMBER(username)
216   IPC_STRUCT_TRAITS_MEMBER(password)
217   IPC_STRUCT_TRAITS_MEMBER(host)
218   IPC_STRUCT_TRAITS_MEMBER(port)
219   IPC_STRUCT_TRAITS_MEMBER(path)
220   IPC_STRUCT_TRAITS_MEMBER(query)
221   IPC_STRUCT_TRAITS_MEMBER(ref)
222 IPC_STRUCT_TRAITS_END()
223
224 IPC_STRUCT_TRAITS_BEGIN(PP_FileInfo)
225   IPC_STRUCT_TRAITS_MEMBER(size)
226   IPC_STRUCT_TRAITS_MEMBER(type)
227   IPC_STRUCT_TRAITS_MEMBER(system_type)
228   IPC_STRUCT_TRAITS_MEMBER(creation_time)
229   IPC_STRUCT_TRAITS_MEMBER(last_access_time)
230   IPC_STRUCT_TRAITS_MEMBER(last_modified_time)
231 IPC_STRUCT_TRAITS_END()
232
233 IPC_STRUCT_TRAITS_BEGIN(ppapi::FileGrowth)
234   IPC_STRUCT_TRAITS_MEMBER(max_written_offset)
235   IPC_STRUCT_TRAITS_MEMBER(append_mode_write_amount)
236 IPC_STRUCT_TRAITS_END()
237
238 IPC_STRUCT_TRAITS_BEGIN(ppapi::CompositorLayerData)
239   IPC_STRUCT_TRAITS_MEMBER(common)
240   IPC_STRUCT_TRAITS_MEMBER(color)
241   IPC_STRUCT_TRAITS_MEMBER(texture)
242   IPC_STRUCT_TRAITS_MEMBER(image)
243 IPC_STRUCT_TRAITS_END()
244
245 IPC_STRUCT_TRAITS_BEGIN(ppapi::CompositorLayerData::LayerCommon)
246   IPC_STRUCT_TRAITS_MEMBER(size)
247   IPC_STRUCT_TRAITS_MEMBER(clip_rect)
248   IPC_STRUCT_TRAITS_MEMBER(transform)
249   IPC_STRUCT_TRAITS_MEMBER(blend_mode)
250   IPC_STRUCT_TRAITS_MEMBER(opacity)
251   IPC_STRUCT_TRAITS_MEMBER(resource_id)
252 IPC_STRUCT_TRAITS_END()
253
254 IPC_STRUCT_TRAITS_BEGIN(ppapi::CompositorLayerData::ColorLayer)
255   IPC_STRUCT_TRAITS_MEMBER(red)
256   IPC_STRUCT_TRAITS_MEMBER(green)
257   IPC_STRUCT_TRAITS_MEMBER(blue)
258   IPC_STRUCT_TRAITS_MEMBER(alpha)
259 IPC_STRUCT_TRAITS_END()
260
261 IPC_STRUCT_TRAITS_BEGIN(ppapi::CompositorLayerData::ImageLayer)
262   IPC_STRUCT_TRAITS_MEMBER(resource)
263   IPC_STRUCT_TRAITS_MEMBER(source_rect)
264 IPC_STRUCT_TRAITS_END()
265
266 IPC_STRUCT_TRAITS_BEGIN(ppapi::CompositorLayerData::TextureLayer)
267   IPC_STRUCT_TRAITS_MEMBER(mailbox)
268   IPC_STRUCT_TRAITS_MEMBER(target)
269   IPC_STRUCT_TRAITS_MEMBER(sync_point)
270   IPC_STRUCT_TRAITS_MEMBER(source_rect)
271   IPC_STRUCT_TRAITS_MEMBER(premult_alpha)
272 IPC_STRUCT_TRAITS_END()
273
274 IPC_STRUCT_TRAITS_BEGIN(ppapi::DeviceRefData)
275   IPC_STRUCT_TRAITS_MEMBER(type)
276   IPC_STRUCT_TRAITS_MEMBER(name)
277   IPC_STRUCT_TRAITS_MEMBER(id)
278 IPC_STRUCT_TRAITS_END()
279
280 IPC_STRUCT_TRAITS_BEGIN(ppapi::DirEntry)
281   IPC_STRUCT_TRAITS_MEMBER(name)
282   IPC_STRUCT_TRAITS_MEMBER(is_dir)
283 IPC_STRUCT_TRAITS_END()
284
285 IPC_STRUCT_TRAITS_BEGIN(ppapi::FileRefCreateInfo)
286   IPC_STRUCT_TRAITS_MEMBER(file_system_type)
287   IPC_STRUCT_TRAITS_MEMBER(internal_path)
288   IPC_STRUCT_TRAITS_MEMBER(display_name)
289   IPC_STRUCT_TRAITS_MEMBER(browser_pending_host_resource_id)
290   IPC_STRUCT_TRAITS_MEMBER(renderer_pending_host_resource_id)
291   IPC_STRUCT_TRAITS_MEMBER(file_system_plugin_resource)
292 IPC_STRUCT_TRAITS_END()
293
294 IPC_STRUCT_TRAITS_BEGIN(ppapi::FlashSiteSetting)
295   IPC_STRUCT_TRAITS_MEMBER(site)
296   IPC_STRUCT_TRAITS_MEMBER(permission)
297 IPC_STRUCT_TRAITS_END()
298
299 IPC_STRUCT_TRAITS_BEGIN(ppapi::MediaStreamAudioTrackShared::Attributes)
300   IPC_STRUCT_TRAITS_MEMBER(buffers)
301   IPC_STRUCT_TRAITS_MEMBER(duration)
302 IPC_STRUCT_TRAITS_END()
303
304 IPC_STRUCT_TRAITS_BEGIN(ppapi::MediaStreamVideoTrackShared::Attributes)
305   IPC_STRUCT_TRAITS_MEMBER(buffers)
306   IPC_STRUCT_TRAITS_MEMBER(width)
307   IPC_STRUCT_TRAITS_MEMBER(height)
308   IPC_STRUCT_TRAITS_MEMBER(format)
309 IPC_STRUCT_TRAITS_END()
310
311 IPC_STRUCT_TRAITS_BEGIN(ppapi::ViewData)
312   IPC_STRUCT_TRAITS_MEMBER(rect)
313   IPC_STRUCT_TRAITS_MEMBER(is_fullscreen)
314   IPC_STRUCT_TRAITS_MEMBER(is_page_visible)
315   IPC_STRUCT_TRAITS_MEMBER(clip_rect)
316   IPC_STRUCT_TRAITS_MEMBER(device_scale)
317   IPC_STRUCT_TRAITS_MEMBER(css_scale)
318   IPC_STRUCT_TRAITS_MEMBER(scroll_offset)
319 IPC_STRUCT_TRAITS_END()
320
321 IPC_STRUCT_TRAITS_BEGIN(PP_TouchPoint)
322   IPC_STRUCT_TRAITS_MEMBER(id)
323   IPC_STRUCT_TRAITS_MEMBER(position)
324   IPC_STRUCT_TRAITS_MEMBER(radius)
325   IPC_STRUCT_TRAITS_MEMBER(rotation_angle)
326   IPC_STRUCT_TRAITS_MEMBER(pressure)
327 IPC_STRUCT_TRAITS_END()
328
329 IPC_STRUCT_TRAITS_BEGIN(ppapi::Preferences)
330   IPC_STRUCT_TRAITS_MEMBER(standard_font_family_map)
331   IPC_STRUCT_TRAITS_MEMBER(fixed_font_family_map)
332   IPC_STRUCT_TRAITS_MEMBER(serif_font_family_map)
333   IPC_STRUCT_TRAITS_MEMBER(sans_serif_font_family_map)
334   IPC_STRUCT_TRAITS_MEMBER(default_font_size)
335   IPC_STRUCT_TRAITS_MEMBER(default_fixed_font_size)
336   IPC_STRUCT_TRAITS_MEMBER(number_of_cpu_cores)
337   IPC_STRUCT_TRAITS_MEMBER(is_3d_supported)
338   IPC_STRUCT_TRAITS_MEMBER(is_stage3d_supported)
339   IPC_STRUCT_TRAITS_MEMBER(is_stage3d_baseline_supported)
340   IPC_STRUCT_TRAITS_MEMBER(is_accelerated_video_decode_enabled)
341 IPC_STRUCT_TRAITS_END()
342
343 IPC_STRUCT_TRAITS_BEGIN(ppapi::InputEventData)
344   IPC_STRUCT_TRAITS_MEMBER(is_filtered)
345   IPC_STRUCT_TRAITS_MEMBER(event_type)
346   IPC_STRUCT_TRAITS_MEMBER(event_time_stamp)
347   IPC_STRUCT_TRAITS_MEMBER(event_modifiers)
348   IPC_STRUCT_TRAITS_MEMBER(mouse_button)
349   IPC_STRUCT_TRAITS_MEMBER(mouse_position)
350   IPC_STRUCT_TRAITS_MEMBER(mouse_click_count)
351   IPC_STRUCT_TRAITS_MEMBER(mouse_movement)
352   IPC_STRUCT_TRAITS_MEMBER(wheel_delta)
353   IPC_STRUCT_TRAITS_MEMBER(wheel_ticks)
354   IPC_STRUCT_TRAITS_MEMBER(wheel_scroll_by_page)
355   IPC_STRUCT_TRAITS_MEMBER(key_code)
356   IPC_STRUCT_TRAITS_MEMBER(code)
357   IPC_STRUCT_TRAITS_MEMBER(character_text)
358   IPC_STRUCT_TRAITS_MEMBER(composition_segment_offsets)
359   IPC_STRUCT_TRAITS_MEMBER(composition_target_segment)
360   IPC_STRUCT_TRAITS_MEMBER(composition_selection_start)
361   IPC_STRUCT_TRAITS_MEMBER(composition_selection_end)
362   IPC_STRUCT_TRAITS_MEMBER(touches)
363   IPC_STRUCT_TRAITS_MEMBER(changed_touches)
364   IPC_STRUCT_TRAITS_MEMBER(target_touches)
365   IPC_STRUCT_TRAITS_MEMBER(latency_info)
366 IPC_STRUCT_TRAITS_END()
367
368 IPC_STRUCT_TRAITS_BEGIN(ppapi::HostPortPair)
369   IPC_STRUCT_TRAITS_MEMBER(host)
370   IPC_STRUCT_TRAITS_MEMBER(port)
371 IPC_STRUCT_TRAITS_END()
372
373 IPC_STRUCT_TRAITS_BEGIN(ppapi::URLRequestInfoData)
374   IPC_STRUCT_TRAITS_MEMBER(url)
375   IPC_STRUCT_TRAITS_MEMBER(method)
376   IPC_STRUCT_TRAITS_MEMBER(headers)
377   IPC_STRUCT_TRAITS_MEMBER(stream_to_file)
378   IPC_STRUCT_TRAITS_MEMBER(follow_redirects)
379   IPC_STRUCT_TRAITS_MEMBER(record_download_progress)
380   IPC_STRUCT_TRAITS_MEMBER(record_upload_progress)
381   IPC_STRUCT_TRAITS_MEMBER(has_custom_referrer_url)
382   IPC_STRUCT_TRAITS_MEMBER(custom_referrer_url)
383   IPC_STRUCT_TRAITS_MEMBER(allow_cross_origin_requests)
384   IPC_STRUCT_TRAITS_MEMBER(allow_credentials)
385   IPC_STRUCT_TRAITS_MEMBER(has_custom_content_transfer_encoding)
386   IPC_STRUCT_TRAITS_MEMBER(custom_content_transfer_encoding)
387   IPC_STRUCT_TRAITS_MEMBER(prefetch_buffer_upper_threshold)
388   IPC_STRUCT_TRAITS_MEMBER(prefetch_buffer_lower_threshold)
389   IPC_STRUCT_TRAITS_MEMBER(has_custom_user_agent)
390   IPC_STRUCT_TRAITS_MEMBER(custom_user_agent)
391   IPC_STRUCT_TRAITS_MEMBER(body)
392 IPC_STRUCT_TRAITS_END()
393
394 IPC_STRUCT_TRAITS_BEGIN(ppapi::URLRequestInfoData::BodyItem)
395   IPC_STRUCT_TRAITS_MEMBER(is_file)
396   IPC_STRUCT_TRAITS_MEMBER(data)
397   IPC_STRUCT_TRAITS_MEMBER(file_ref_pp_resource)
398   IPC_STRUCT_TRAITS_MEMBER(start_offset)
399   IPC_STRUCT_TRAITS_MEMBER(number_of_bytes)
400   IPC_STRUCT_TRAITS_MEMBER(expected_last_modified_time)
401 IPC_STRUCT_TRAITS_END()
402
403 IPC_STRUCT_TRAITS_BEGIN(ppapi::URLResponseInfoData)
404   IPC_STRUCT_TRAITS_MEMBER(url)
405   IPC_STRUCT_TRAITS_MEMBER(headers)
406   IPC_STRUCT_TRAITS_MEMBER(status_code)
407   IPC_STRUCT_TRAITS_MEMBER(status_text)
408   IPC_STRUCT_TRAITS_MEMBER(redirect_url)
409   IPC_STRUCT_TRAITS_MEMBER(body_as_file_ref)
410 IPC_STRUCT_TRAITS_END()
411
412 IPC_STRUCT_TRAITS_BEGIN(ppapi::proxy::SerializedNetworkInfo)
413   IPC_STRUCT_TRAITS_MEMBER(name)
414   IPC_STRUCT_TRAITS_MEMBER(type)
415   IPC_STRUCT_TRAITS_MEMBER(state)
416   IPC_STRUCT_TRAITS_MEMBER(addresses)
417   IPC_STRUCT_TRAITS_MEMBER(display_name)
418   IPC_STRUCT_TRAITS_MEMBER(mtu)
419 IPC_STRUCT_TRAITS_END()
420
421 // Only whitelisted switches passed through PpapiNaClPluginArgs.
422 // The list of switches can be found in:
423 //   components/nacl/browser/nacl_process_host.cc
424 IPC_STRUCT_TRAITS_BEGIN(ppapi::PpapiNaClPluginArgs)
425   IPC_STRUCT_TRAITS_MEMBER(off_the_record)
426   IPC_STRUCT_TRAITS_MEMBER(permissions)
427   IPC_STRUCT_TRAITS_MEMBER(keepalive_throttle_interval_milliseconds)
428   IPC_STRUCT_TRAITS_MEMBER(switch_names)
429   IPC_STRUCT_TRAITS_MEMBER(switch_values)
430 IPC_STRUCT_TRAITS_END()
431
432 #if !defined(OS_NACL) && !defined(NACL_WIN64)
433
434 IPC_STRUCT_TRAITS_BEGIN(ppapi::proxy::PPPDecryptor_Buffer)
435   IPC_STRUCT_TRAITS_MEMBER(resource)
436   IPC_STRUCT_TRAITS_MEMBER(handle)
437   IPC_STRUCT_TRAITS_MEMBER(size)
438 IPC_STRUCT_TRAITS_END()
439
440 #endif  // !defined(OS_NACL) && !defined(NACL_WIN64)
441
442 // These are from the browser to the plugin.
443 // Loads the given plugin.
444 IPC_MESSAGE_CONTROL2(PpapiMsg_LoadPlugin,
445                      base::FilePath /* path */,
446                      ppapi::PpapiPermissions /* permissions */)
447
448 // Creates a channel to talk to a renderer. The plugin will respond with
449 // PpapiHostMsg_ChannelCreated.
450 IPC_MESSAGE_CONTROL3(PpapiMsg_CreateChannel,
451                      base::ProcessId /* renderer_pid */,
452                      int /* renderer_child_id */,
453                      bool /* incognito */)
454
455 // Initializes the IPC dispatchers in the NaCl plugin.
456 IPC_MESSAGE_CONTROL1(PpapiMsg_InitializeNaClDispatcher,
457                      ppapi::PpapiNaClPluginArgs /* args */)
458
459 // Instructs the plugin process to crash.
460 IPC_MESSAGE_CONTROL0(PpapiMsg_Crash)
461
462 // Instructs the plugin process to hang.
463 IPC_MESSAGE_CONTROL0(PpapiMsg_Hang)
464
465 // Each plugin may be referenced by multiple renderers. We need the instance
466 // IDs to be unique within a plugin, despite coming from different renderers,
467 // and unique within a renderer, despite going to different plugins. This means
468 // that neither the renderer nor the plugin can generate instance IDs without
469 // consulting the other.
470 //
471 // We resolve this by having the renderer generate a unique instance ID inside
472 // its process. It then asks the plugin to reserve that ID by sending this sync
473 // message. If the plugin has not yet seen this ID, it will remember it as used
474 // (to prevent a race condition if another renderer tries to then use the same
475 // instance), and set usable as true.
476 //
477 // If the plugin has already seen the instance ID, it will set usable as false
478 // and the renderer must retry a new instance ID.
479 IPC_SYNC_MESSAGE_CONTROL1_1(PpapiMsg_ReserveInstanceId,
480                             PP_Instance /* instance */,
481                             bool /* usable */)
482
483 // Passes the WebKit preferences to the plugin.
484 IPC_MESSAGE_CONTROL1(PpapiMsg_SetPreferences,
485                      ppapi::Preferences)
486
487 // Sent in both directions to see if the other side supports the given
488 // interface.
489 IPC_SYNC_MESSAGE_CONTROL1_1(PpapiMsg_SupportsInterface,
490                             std::string /* interface_name */,
491                             bool /* result */)
492
493 IPC_MESSAGE_CONTROL1(PpapiHostMsg_LogInterfaceUsage,
494                      int /* interface_hash */)
495
496 #if !defined(OS_NACL) && !defined(NACL_WIN64)
497 // Network state notification from the browser for implementing
498 // PPP_NetworkState_Dev.
499 IPC_MESSAGE_CONTROL1(PpapiMsg_SetNetworkState,
500                      bool /* online */)
501
502 // Requests a list of sites that have data stored from the plugin. The plugin
503 // process will respond with PpapiHostMsg_GetSitesWithDataResult. This is used
504 // for Flash.
505 IPC_MESSAGE_CONTROL2(PpapiMsg_GetSitesWithData,
506                      uint32 /* request_id */,
507                      base::FilePath /* plugin_data_path */)
508 IPC_MESSAGE_CONTROL2(PpapiHostMsg_GetSitesWithDataResult,
509                      uint32 /* request_id */,
510                      std::vector<std::string> /* sites */)
511
512 // Instructs the plugin to clear data for the given site & time. The plugin
513 // process will respond with PpapiHostMsg_ClearSiteDataResult. This is used
514 // for Flash.
515 IPC_MESSAGE_CONTROL5(PpapiMsg_ClearSiteData,
516                      uint32 /* request_id */,
517                      base::FilePath /* plugin_data_path */,
518                      std::string /* site */,
519                      uint64 /* flags */,
520                      uint64 /* max_age */)
521 IPC_MESSAGE_CONTROL2(PpapiHostMsg_ClearSiteDataResult,
522                      uint32 /* request_id */,
523                      bool /* success */)
524
525 IPC_MESSAGE_CONTROL2(PpapiMsg_DeauthorizeContentLicenses,
526                      uint32 /* request_id */,
527                      base::FilePath /* plugin_data_path */)
528 IPC_MESSAGE_CONTROL2(PpapiHostMsg_DeauthorizeContentLicensesResult,
529                      uint32 /* request_id */,
530                      bool /* success */)
531
532 IPC_MESSAGE_CONTROL3(PpapiMsg_GetPermissionSettings,
533                      uint32 /* request_id */,
534                      base::FilePath /* plugin_data_path */,
535                      PP_Flash_BrowserOperations_SettingType /* setting_type */)
536 IPC_MESSAGE_CONTROL4(
537     PpapiHostMsg_GetPermissionSettingsResult,
538     uint32 /* request_id */,
539     bool /* success */,
540     PP_Flash_BrowserOperations_Permission /* default_permission */,
541     ppapi::FlashSiteSettings /* sites */)
542
543 IPC_MESSAGE_CONTROL5(PpapiMsg_SetDefaultPermission,
544                      uint32 /* request_id */,
545                      base::FilePath /* plugin_data_path */,
546                      PP_Flash_BrowserOperations_SettingType /* setting_type */,
547                      PP_Flash_BrowserOperations_Permission /* permission */,
548                      bool /* clear_site_specific */)
549 IPC_MESSAGE_CONTROL2(PpapiHostMsg_SetDefaultPermissionResult,
550                      uint32 /* request_id */,
551                      bool /* success */)
552
553 IPC_MESSAGE_CONTROL4(PpapiMsg_SetSitePermission,
554                      uint32 /* request_id */,
555                      base::FilePath /* plugin_data_path */,
556                      PP_Flash_BrowserOperations_SettingType /* setting_type */,
557                      ppapi::FlashSiteSettings /* sites */)
558 IPC_MESSAGE_CONTROL2(PpapiHostMsg_SetSitePermissionResult,
559                      uint32 /* request_id */,
560                      bool /* success */)
561
562 // Broker Process.
563 IPC_SYNC_MESSAGE_CONTROL2_1(PpapiMsg_ConnectToPlugin,
564                             PP_Instance /* instance */,
565                             IPC::PlatformFileForTransit /* handle */,
566                             int32_t /* result */)
567 #endif  // !defined(OS_NACL) && !defined(NACL_WIN64)
568
569 // PPB_Audio.
570
571 // Notifies the result of the audio stream create call. This is called in
572 // both error cases and in the normal success case. These cases are
573 // differentiated by the result code, which is one of the standard PPAPI
574 // result codes.
575 //
576 // The handler of this message should always close all of the handles passed
577 // in, since some could be valid even in the error case.
578 IPC_MESSAGE_ROUTED4(PpapiMsg_PPBAudio_NotifyAudioStreamCreated,
579                     ppapi::HostResource /* audio_id */,
580                     int32_t /* result_code (will be != PP_OK on failure) */,
581                     ppapi::proxy::SerializedHandle /* socket_handle */,
582                     ppapi::proxy::SerializedHandle /* handle */)
583
584 // PPB_Graphics3D.
585 IPC_MESSAGE_ROUTED2(PpapiMsg_PPBGraphics3D_SwapBuffersACK,
586                     ppapi::HostResource /* graphics_3d */,
587                     int32_t /* pp_error */)
588
589 // PPB_ImageData.
590 IPC_MESSAGE_ROUTED1(PpapiMsg_PPBImageData_NotifyUnusedImageData,
591                     ppapi::HostResource /* old_image_data */)
592
593 // PPB_Instance.
594 IPC_MESSAGE_ROUTED2(PpapiMsg_PPBInstance_MouseLockComplete,
595                     PP_Instance /* instance */,
596                     int32_t /* result */)
597
598 // PPP_Class.
599 IPC_SYNC_MESSAGE_ROUTED3_2(PpapiMsg_PPPClass_HasProperty,
600                            int64 /* ppp_class */,
601                            int64 /* object */,
602                            ppapi::proxy::SerializedVar /* property */,
603                            ppapi::proxy::SerializedVar /* out_exception */,
604                            bool /* result */)
605 IPC_SYNC_MESSAGE_ROUTED3_2(PpapiMsg_PPPClass_HasMethod,
606                            int64 /* ppp_class */,
607                            int64 /* object */,
608                            ppapi::proxy::SerializedVar /* method */,
609                            ppapi::proxy::SerializedVar /* out_exception */,
610                            bool /* result */)
611 IPC_SYNC_MESSAGE_ROUTED3_2(PpapiMsg_PPPClass_GetProperty,
612                            int64 /* ppp_class */,
613                            int64 /* object */,
614                            ppapi::proxy::SerializedVar /* property */,
615                            ppapi::proxy::SerializedVar /* out_exception */,
616                            ppapi::proxy::SerializedVar /* result */)
617 IPC_SYNC_MESSAGE_ROUTED2_2(PpapiMsg_PPPClass_EnumerateProperties,
618                            int64 /* ppp_class */,
619                            int64 /* object */,
620                            std::vector<ppapi::proxy::SerializedVar> /* props */,
621                            ppapi::proxy::SerializedVar /* out_exception */)
622 IPC_SYNC_MESSAGE_ROUTED4_1(PpapiMsg_PPPClass_SetProperty,
623                            int64 /* ppp_class */,
624                            int64 /* object */,
625                            ppapi::proxy::SerializedVar /* name */,
626                            ppapi::proxy::SerializedVar /* value */,
627                            ppapi::proxy::SerializedVar /* out_exception */)
628 IPC_SYNC_MESSAGE_ROUTED3_1(PpapiMsg_PPPClass_RemoveProperty,
629                            int64 /* ppp_class */,
630                            int64 /* object */,
631                            ppapi::proxy::SerializedVar /* property */,
632                            ppapi::proxy::SerializedVar /* out_exception */)
633 IPC_SYNC_MESSAGE_ROUTED4_2(PpapiMsg_PPPClass_Call,
634                            int64 /* ppp_class */,
635                            int64 /* object */,
636                            ppapi::proxy::SerializedVar /* method_name */,
637                            std::vector<ppapi::proxy::SerializedVar> /* args */,
638                            ppapi::proxy::SerializedVar /* out_exception */,
639                            ppapi::proxy::SerializedVar /* result */)
640 IPC_SYNC_MESSAGE_ROUTED3_2(PpapiMsg_PPPClass_Construct,
641                            int64 /* ppp_class */,
642                            int64 /* object */,
643                            std::vector<ppapi::proxy::SerializedVar> /* args */,
644                            ppapi::proxy::SerializedVar /* out_exception */,
645                            ppapi::proxy::SerializedVar /* result */)
646 IPC_MESSAGE_ROUTED2(PpapiMsg_PPPClass_Deallocate,
647                     int64 /* ppp_class */,
648                     int64 /* object */)
649
650 // PPP_Graphics3D_Dev.
651 IPC_MESSAGE_ROUTED1(PpapiMsg_PPPGraphics3D_ContextLost,
652                     PP_Instance /* instance */)
653
654 // PPP_InputEvent.
655 IPC_MESSAGE_ROUTED2(PpapiMsg_PPPInputEvent_HandleInputEvent,
656                     PP_Instance /* instance */,
657                     ppapi::InputEventData /* data */)
658 IPC_SYNC_MESSAGE_ROUTED2_1(PpapiMsg_PPPInputEvent_HandleFilteredInputEvent,
659                            PP_Instance /* instance */,
660                            ppapi::InputEventData /* data */,
661                            PP_Bool /* result */)
662
663 // PPP_Instance.
664 IPC_SYNC_MESSAGE_ROUTED3_1(PpapiMsg_PPPInstance_DidCreate,
665                            PP_Instance /* instance */,
666                            std::vector<std::string> /* argn */,
667                            std::vector<std::string> /* argv */,
668                            PP_Bool /* result */)
669 IPC_SYNC_MESSAGE_ROUTED1_0(PpapiMsg_PPPInstance_DidDestroy,
670                            PP_Instance /* instance */)
671 IPC_MESSAGE_ROUTED3(PpapiMsg_PPPInstance_DidChangeView,
672                     PP_Instance /* instance */,
673                     ppapi::ViewData /* new_data */,
674                     PP_Bool /* flash_fullscreen */)
675 IPC_MESSAGE_ROUTED2(PpapiMsg_PPPInstance_DidChangeFocus,
676                     PP_Instance /* instance */,
677                     PP_Bool /* has_focus */)
678 IPC_MESSAGE_ROUTED3(PpapiMsg_PPPInstance_HandleDocumentLoad,
679     PP_Instance /* instance */,
680     int /* pending_loader_host_id */,
681     ppapi::URLResponseInfoData /* response */)
682
683 // PPP_Messaging and PPP_MessageHandler.
684 IPC_MESSAGE_ROUTED2(PpapiMsg_PPPMessaging_HandleMessage,
685                     PP_Instance /* instance */,
686                     ppapi::proxy::SerializedVar /* message */)
687 IPC_SYNC_MESSAGE_ROUTED2_2(PpapiMsg_PPPMessageHandler_HandleBlockingMessage,
688                            PP_Instance /* instance */,
689                            ppapi::proxy::SerializedVar /* message */,
690                            ppapi::proxy::SerializedVar /* result */,
691                            bool /* was_handled */)
692
693 // PPP_MouseLock.
694 IPC_MESSAGE_ROUTED1(PpapiMsg_PPPMouseLock_MouseLockLost,
695                     PP_Instance /* instance */)
696
697 // PPP_Pdf
698 IPC_MESSAGE_ROUTED2(PpapiMsg_PPPPdf_Rotate,
699                     PP_Instance /* instance */,
700                     bool /* clockwise */)
701
702 // Find
703 IPC_MESSAGE_ROUTED2(PpapiPluginMsg_PPPFind_StartFind,
704                     PP_Instance /* instance */,
705                     std::string /* text */)
706 IPC_MESSAGE_ROUTED2(PpapiPluginMsg_PPPFind_SelectFindResult,
707                     PP_Instance /* instance */,
708                     PP_Bool /* forward */)
709 IPC_MESSAGE_ROUTED1(PpapiPluginMsg_PPPFind_StopFind,
710                     PP_Instance /* instance */)
711
712 IPC_MESSAGE_ROUTED1(PpapiHostMsg_PPBInstance_SetPluginToHandleFindRequests,
713                     PP_Instance /* instance */)
714 IPC_MESSAGE_ROUTED3(PpapiHostMsg_PPBInstance_NumberOfFindResultsChanged,
715                     PP_Instance /* instance */,
716                     int32_t /* total */,
717                     PP_Bool /* final_result */)
718 IPC_MESSAGE_ROUTED2(PpapiHostMsg_PPBInstance_SelectFindResultChanged,
719                     PP_Instance /* instance */,
720                     int32_t /* index */)
721 IPC_MESSAGE_ROUTED2(PpapiHostMsg_PPBInstance_SetTickmarks,
722                     PP_Instance /* instance */,
723                     std::vector<PP_Rect> /* tickmarks */)
724
725 // PPP_Printing
726 IPC_SYNC_MESSAGE_ROUTED1_1(PpapiMsg_PPPPrinting_QuerySupportedFormats,
727                            PP_Instance /* instance */,
728                            uint32_t /* result */)
729 IPC_SYNC_MESSAGE_ROUTED2_1(PpapiMsg_PPPPrinting_Begin,
730                            PP_Instance /* instance */,
731                            std::string /* settings_string */,
732                            int32_t /* result */)
733 IPC_SYNC_MESSAGE_ROUTED2_1(PpapiMsg_PPPPrinting_PrintPages,
734                            PP_Instance /* instance */,
735                            std::vector<PP_PrintPageNumberRange_Dev> /* pages */,
736                            ppapi::HostResource /* result */)
737 IPC_MESSAGE_ROUTED1(PpapiMsg_PPPPrinting_End,
738                     PP_Instance /* instance */)
739 IPC_SYNC_MESSAGE_ROUTED1_1(PpapiMsg_PPPPrinting_IsScalingDisabled,
740                            PP_Instance /* instance */,
741                            bool /* result */)
742
743 // PPP_TextInput.
744 IPC_MESSAGE_ROUTED2(PpapiMsg_PPPTextInput_RequestSurroundingText,
745                    PP_Instance /* instance */,
746                    uint32_t /* desired_number_of_characters */)
747
748 #if !defined(OS_NACL) && !defined(NACL_WIN64)
749 // PPB_Broker.
750 IPC_MESSAGE_ROUTED3(
751     PpapiMsg_PPBBroker_ConnectComplete,
752     ppapi::HostResource /* broker */,
753     IPC::PlatformFileForTransit /* handle */,
754     int32_t /* result */)
755
756 // PPP_ContentDecryptor_Dev
757 IPC_MESSAGE_ROUTED2(PpapiMsg_PPPContentDecryptor_Initialize,
758                     PP_Instance /* instance */,
759                     ppapi::proxy::SerializedVar /* key_system, String */)
760 IPC_MESSAGE_ROUTED3(PpapiMsg_PPPContentDecryptor_SetServerCertificate,
761                     PP_Instance /* instance */,
762                     uint32_t /* promise_id */,
763                     std::vector<uint8_t> /* certificate */)
764 IPC_MESSAGE_ROUTED5(PpapiMsg_PPPContentDecryptor_CreateSession,
765                     PP_Instance /* instance */,
766                     uint32_t /* promise_id */,
767                     ppapi::proxy::SerializedVar /* init_data_type, String */,
768                     ppapi::proxy::SerializedVar /* init_data, ArrayBuffer */,
769                     PP_SessionType /* session_type */)
770 IPC_MESSAGE_ROUTED3(PpapiMsg_PPPContentDecryptor_LoadSession,
771                     PP_Instance /* instance */,
772                     uint32_t /* promise_id */,
773                     ppapi::proxy::SerializedVar /* web_session_id, String */)
774 IPC_MESSAGE_ROUTED4(PpapiMsg_PPPContentDecryptor_UpdateSession,
775                     PP_Instance /* instance */,
776                     uint32_t /* promise_id */,
777                     ppapi::proxy::SerializedVar /* web_session_id, String */,
778                     ppapi::proxy::SerializedVar /* response, ArrayBuffer */)
779 IPC_MESSAGE_ROUTED3(PpapiMsg_PPPContentDecryptor_CloseSession,
780                     PP_Instance /* instance */,
781                     uint32_t /* promise_id */,
782                     std::string /* web_session_id */)
783 IPC_MESSAGE_ROUTED3(PpapiMsg_PPPContentDecryptor_RemoveSession,
784                     PP_Instance /* instance */,
785                     uint32_t /* promise_id */,
786                     std::string /* web_session_id */)
787 IPC_MESSAGE_ROUTED3(PpapiMsg_PPPContentDecryptor_GetUsableKeyIds,
788                     PP_Instance /* instance */,
789                     uint32_t /* promise_id */,
790                     std::string /* web_session_id */)
791 IPC_MESSAGE_ROUTED3(PpapiMsg_PPPContentDecryptor_Decrypt,
792                     PP_Instance /* instance */,
793                     ppapi::proxy::PPPDecryptor_Buffer /* buffer */,
794                     std::string /* serialized_block_info */)
795 IPC_MESSAGE_ROUTED3(
796     PpapiMsg_PPPContentDecryptor_InitializeAudioDecoder,
797     PP_Instance /* instance */,
798     std::string /* serialized_decoder_config */,
799     ppapi::proxy::PPPDecryptor_Buffer /* extra_data_buffer */)
800 IPC_MESSAGE_ROUTED3(
801     PpapiMsg_PPPContentDecryptor_InitializeVideoDecoder,
802     PP_Instance /* instance */,
803     std::string /* serialized_decoder_config */,
804     ppapi::proxy::PPPDecryptor_Buffer /* extra_data_buffer. */)
805 IPC_MESSAGE_ROUTED3(PpapiMsg_PPPContentDecryptor_DeinitializeDecoder,
806                     PP_Instance /* instance */,
807                     PP_DecryptorStreamType /* decoder_type */,
808                     uint32_t /* request_id */)
809 IPC_MESSAGE_ROUTED3(PpapiMsg_PPPContentDecryptor_ResetDecoder,
810                     PP_Instance /* instance */,
811                     PP_DecryptorStreamType /* decoder_type */,
812                     uint32_t /* request_id */)
813 IPC_MESSAGE_ROUTED4(PpapiMsg_PPPContentDecryptor_DecryptAndDecode,
814                     PP_Instance /* instance */,
815                     PP_DecryptorStreamType /* decoder_type */,
816                     ppapi::proxy::PPPDecryptor_Buffer /* buffer */,
817                     std::string /* serialized_block_info */)
818
819 // PPP_Instance_Private.
820 IPC_SYNC_MESSAGE_ROUTED1_1(PpapiMsg_PPPInstancePrivate_GetInstanceObject,
821                            PP_Instance /* instance */,
822                            ppapi::proxy::SerializedVar /* result */)
823
824 #endif  // !defined(OS_NACL) && !defined(NACL_WIN64)
825
826 // Reports to the browser that a plugin has been active.
827 IPC_MESSAGE_CONTROL0(PpapiHostMsg_Keepalive)
828
829 // -----------------------------------------------------------------------------
830 // These are from the plugin to the renderer.
831
832 // Reply to PpapiMsg_CreateChannel. The handle will be NULL if the channel
833 // could not be established. This could be because the IPC could not be created
834 // for some weird reason, but more likely that the plugin failed to load or
835 // initialize properly.
836 IPC_MESSAGE_CONTROL1(PpapiHostMsg_ChannelCreated,
837                      IPC::ChannelHandle /* handle */)
838
839 // Notify the renderer that the PPAPI channel gets ready in the plugin.
840 IPC_MESSAGE_CONTROL0(PpapiHostMsg_StartupInitializationComplete)
841
842 // Calls renderer to open a resource file for nacl_irt_open_resource().
843 IPC_SYNC_MESSAGE_CONTROL1_3(PpapiHostMsg_OpenResource,
844                             std::string /* key */,
845                             ppapi::proxy::SerializedHandle /* fd */,
846                             uint64_t /* file_token_lo */,
847                             uint64_t /* file_token_hi */)
848
849 // Logs the given message to the console of all instances.
850 IPC_MESSAGE_CONTROL4(PpapiHostMsg_LogWithSource,
851                      PP_Instance /* instance */,
852                      int /* log_level */,
853                      std::string /* source */,
854                      std::string /* value */)
855
856 // PPB_Audio.
857 IPC_SYNC_MESSAGE_ROUTED3_1(PpapiHostMsg_PPBAudio_Create,
858                            PP_Instance /* instance_id */,
859                            int32_t /* sample_rate */,
860                            uint32_t /* sample_frame_count */,
861                            ppapi::HostResource /* result */)
862 IPC_MESSAGE_ROUTED2(PpapiHostMsg_PPBAudio_StartOrStop,
863                     ppapi::HostResource /* audio_id */,
864                     bool /* play */)
865
866 // PPB_Core.
867 IPC_MESSAGE_ROUTED1(PpapiHostMsg_PPBCore_AddRefResource,
868                     ppapi::HostResource)
869 IPC_MESSAGE_ROUTED1(PpapiHostMsg_PPBCore_ReleaseResource,
870                     ppapi::HostResource)
871
872 // PPB_Graphics3D.
873 IPC_SYNC_MESSAGE_ROUTED3_3(PpapiHostMsg_PPBGraphics3D_Create,
874                            PP_Instance /* instance */,
875                            ppapi::HostResource /* share_context */,
876                            std::vector<int32_t> /* attrib_list */,
877                            ppapi::HostResource /* result */,
878                            gpu::Capabilities /* capabilities */,
879                            ppapi::proxy::SerializedHandle /* shared_state */)
880 IPC_SYNC_MESSAGE_ROUTED2_0(PpapiHostMsg_PPBGraphics3D_SetGetBuffer,
881                            ppapi::HostResource /* context */,
882                            int32 /* transfer_buffer_id */)
883 IPC_SYNC_MESSAGE_ROUTED3_2(PpapiHostMsg_PPBGraphics3D_WaitForTokenInRange,
884                            ppapi::HostResource /* context */,
885                            int32 /* start */,
886                            int32 /* end */,
887                            gpu::CommandBuffer::State /* state */,
888                            bool /* success */)
889 IPC_SYNC_MESSAGE_ROUTED3_2(PpapiHostMsg_PPBGraphics3D_WaitForGetOffsetInRange,
890                            ppapi::HostResource /* context */,
891                            int32 /* start */,
892                            int32 /* end */,
893                            gpu::CommandBuffer::State /* state */,
894                            bool /* success */)
895 IPC_MESSAGE_ROUTED2(PpapiHostMsg_PPBGraphics3D_AsyncFlush,
896                     ppapi::HostResource /* context */,
897                     int32 /* put_offset */)
898 IPC_SYNC_MESSAGE_ROUTED2_2(PpapiHostMsg_PPBGraphics3D_CreateTransferBuffer,
899                            ppapi::HostResource /* context */,
900                            uint32 /* size */,
901                            int32 /* id */,
902                            ppapi::proxy::SerializedHandle /* transfer_buffer */)
903 IPC_SYNC_MESSAGE_ROUTED2_0(PpapiHostMsg_PPBGraphics3D_DestroyTransferBuffer,
904                            ppapi::HostResource /* context */,
905                            int32 /* id */)
906 IPC_MESSAGE_ROUTED1(PpapiHostMsg_PPBGraphics3D_SwapBuffers,
907                     ppapi::HostResource /* graphics_3d */)
908 IPC_SYNC_MESSAGE_ROUTED1_1(PpapiHostMsg_PPBGraphics3D_InsertSyncPoint,
909                            ppapi::HostResource /* context */,
910                            uint32 /* sync_point */)
911 IPC_SYNC_MESSAGE_ROUTED1_1(PpapiHostMsg_PPBGraphics3D_InsertFutureSyncPoint,
912                            ppapi::HostResource /* context */,
913                            uint32 /* sync_point */)
914 IPC_MESSAGE_ROUTED2(PpapiHostMsg_PPBGraphics3D_RetireSyncPoint,
915                     ppapi::HostResource /* context */,
916                     uint32 /* sync_point */)
917
918 // PPB_ImageData.
919 IPC_SYNC_MESSAGE_ROUTED4_3(PpapiHostMsg_PPBImageData_CreatePlatform,
920                            PP_Instance /* instance */,
921                            int32 /* format */,
922                            PP_Size /* size */,
923                            PP_Bool /* init_to_zero */,
924                            ppapi::HostResource /* result_resource */,
925                            PP_ImageDataDesc /* image_data_desc */,
926                            ppapi::proxy::ImageHandle /* result */)
927 IPC_SYNC_MESSAGE_ROUTED4_3(PpapiHostMsg_PPBImageData_CreateSimple,
928                            PP_Instance /* instance */,
929                            int32 /* format */,
930                            PP_Size /* size */,
931                            PP_Bool /* init_to_zero */,
932                            ppapi::HostResource /* result_resource */,
933                            PP_ImageDataDesc /* image_data_desc */,
934                            ppapi::proxy::SerializedHandle /* result */)
935
936 // PPB_Instance.
937 IPC_SYNC_MESSAGE_ROUTED1_1(PpapiHostMsg_PPBInstance_GetWindowObject,
938                            PP_Instance /* instance */,
939                            ppapi::proxy::SerializedVar /* result */)
940 IPC_SYNC_MESSAGE_ROUTED1_1(PpapiHostMsg_PPBInstance_GetOwnerElementObject,
941                            PP_Instance /* instance */,
942                            ppapi::proxy::SerializedVar /* result */)
943 IPC_MESSAGE_ROUTED2(PpapiHostMsg_PPBInstance_BindGraphics,
944                     PP_Instance /* instance */,
945                     PP_Resource /* device */)
946 IPC_SYNC_MESSAGE_ROUTED1_1(
947     PpapiHostMsg_PPBInstance_GetAudioHardwareOutputSampleRate,
948                            PP_Instance /* instance */,
949                            uint32_t /* result */)
950 IPC_SYNC_MESSAGE_ROUTED1_1(
951     PpapiHostMsg_PPBInstance_GetAudioHardwareOutputBufferSize,
952                            PP_Instance /* instance */,
953                            uint32_t /* result */)
954 IPC_SYNC_MESSAGE_ROUTED1_1(PpapiHostMsg_PPBInstance_IsFullFrame,
955                            PP_Instance /* instance */,
956                            PP_Bool /* result */)
957 IPC_SYNC_MESSAGE_ROUTED2_2(PpapiHostMsg_PPBInstance_ExecuteScript,
958                            PP_Instance /* instance */,
959                            ppapi::proxy::SerializedVar /* script */,
960                            ppapi::proxy::SerializedVar /* out_exception */,
961                            ppapi::proxy::SerializedVar /* result */)
962 IPC_SYNC_MESSAGE_ROUTED1_1(PpapiHostMsg_PPBInstance_GetDefaultCharSet,
963                            PP_Instance /* instance */,
964                            ppapi::proxy::SerializedVar /* result */)
965 IPC_SYNC_MESSAGE_ROUTED2_1(PpapiHostMsg_PPBInstance_SetFullscreen,
966                            PP_Instance /* instance */,
967                            PP_Bool /* fullscreen */,
968                            PP_Bool /* result */)
969 IPC_SYNC_MESSAGE_ROUTED1_2(PpapiHostMsg_PPBInstance_GetScreenSize,
970                            PP_Instance /* instance */,
971                            PP_Bool /* result */,
972                            PP_Size /* size */)
973 IPC_MESSAGE_ROUTED3(PpapiHostMsg_PPBInstance_RequestInputEvents,
974                     PP_Instance /* instance */,
975                     bool /* is_filtering */,
976                     uint32_t /* event_classes */)
977 IPC_MESSAGE_ROUTED2(PpapiHostMsg_PPBInstance_ClearInputEvents,
978                     PP_Instance /* instance */,
979                     uint32_t /* event_classes */)
980 IPC_MESSAGE_ROUTED1(PpapiHostMsg_PPBInstance_StartTrackingLatency,
981                     PP_Instance /* instance */)
982 IPC_MESSAGE_ROUTED2(PpapiHostMsg_PPBInstance_PostMessage,
983                     PP_Instance /* instance */,
984                     ppapi::proxy::SerializedVar /* message */)
985 IPC_MESSAGE_ROUTED1(PpapiHostMsg_PPBInstance_LockMouse,
986                     PP_Instance /* instance */)
987 IPC_MESSAGE_ROUTED1(PpapiHostMsg_PPBInstance_UnlockMouse,
988                     PP_Instance /* instance */)
989 IPC_SYNC_MESSAGE_ROUTED2_1(PpapiHostMsg_PPBInstance_ResolveRelativeToDocument,
990                            PP_Instance /* instance */,
991                            ppapi::proxy::SerializedVar /* relative */,
992                            ppapi::proxy::SerializedVar /* result */)
993 IPC_SYNC_MESSAGE_ROUTED2_1(PpapiHostMsg_PPBInstance_DocumentCanRequest,
994                            PP_Instance /* instance */,
995                            ppapi::proxy::SerializedVar /* relative */,
996                            PP_Bool /* result */)
997 IPC_SYNC_MESSAGE_ROUTED2_1(PpapiHostMsg_PPBInstance_DocumentCanAccessDocument,
998                            PP_Instance /* active */,
999                            PP_Instance /* target */,
1000                            PP_Bool /* result */)
1001 IPC_SYNC_MESSAGE_ROUTED1_2(PpapiHostMsg_PPBInstance_GetDocumentURL,
1002                            PP_Instance /* active */,
1003                            PP_URLComponents_Dev /* components */,
1004                            ppapi::proxy::SerializedVar /* result */)
1005 IPC_SYNC_MESSAGE_ROUTED1_1(PpapiHostMsg_PPBInstance_GetPluginInstanceURL,
1006                            PP_Instance /* active */,
1007                            ppapi::proxy::SerializedVar /* result */)
1008 IPC_SYNC_MESSAGE_ROUTED1_1(PpapiHostMsg_PPBInstance_GetPluginReferrerURL,
1009                            PP_Instance /* instance */,
1010                            ppapi::proxy::SerializedVar /* result */)
1011 IPC_MESSAGE_ROUTED4(PpapiHostMsg_PPBInstance_SetCursor,
1012                     PP_Instance /* instance */,
1013                     int32_t /* type */,
1014                     ppapi::HostResource /* custom_image */,
1015                     PP_Point /* hot_spot */)
1016 IPC_MESSAGE_ROUTED2(PpapiHostMsg_PPBInstance_SetTextInputType,
1017                     PP_Instance /* instance */,
1018                     PP_TextInput_Type /* type */)
1019 IPC_MESSAGE_ROUTED3(PpapiHostMsg_PPBInstance_UpdateCaretPosition,
1020                     PP_Instance /* instance */,
1021                     PP_Rect /* caret */,
1022                     PP_Rect /* bounding_box */)
1023 IPC_MESSAGE_ROUTED1(PpapiHostMsg_PPBInstance_CancelCompositionText,
1024                     PP_Instance /* instance */)
1025 IPC_MESSAGE_ROUTED4(PpapiHostMsg_PPBInstance_UpdateSurroundingText,
1026                     PP_Instance /* instance */,
1027                     std::string /* text */,
1028                     uint32_t /* caret */,
1029                     uint32_t /* anchor */)
1030
1031 // PPB_Var.
1032 IPC_SYNC_MESSAGE_ROUTED1_0(PpapiHostMsg_PPBVar_AddRefObject,
1033                            int64 /* object_id */)
1034 IPC_MESSAGE_ROUTED1(PpapiHostMsg_PPBVar_ReleaseObject,
1035                     int64 /* object_id */)
1036 IPC_SYNC_MESSAGE_ROUTED2_2(PpapiHostMsg_PPBVar_HasProperty,
1037                            ppapi::proxy::SerializedVar /* object */,
1038                            ppapi::proxy::SerializedVar /* property */,
1039                            ppapi::proxy::SerializedVar /* out_exception */,
1040                            PP_Bool /* result */)
1041 IPC_SYNC_MESSAGE_ROUTED2_2(PpapiHostMsg_PPBVar_HasMethodDeprecated,
1042                            ppapi::proxy::SerializedVar /* object */,
1043                            ppapi::proxy::SerializedVar /* method */,
1044                            ppapi::proxy::SerializedVar /* out_exception */,
1045                            PP_Bool /* result */)
1046 IPC_SYNC_MESSAGE_ROUTED2_2(PpapiHostMsg_PPBVar_GetProperty,
1047                            ppapi::proxy::SerializedVar /* object */,
1048                            ppapi::proxy::SerializedVar /* property */,
1049                            ppapi::proxy::SerializedVar /* out_exception */,
1050                            ppapi::proxy::SerializedVar /* result */)
1051 IPC_SYNC_MESSAGE_ROUTED2_2(PpapiHostMsg_PPBVar_DeleteProperty,
1052                            ppapi::proxy::SerializedVar /* object */,
1053                            ppapi::proxy::SerializedVar /* property */,
1054                            ppapi::proxy::SerializedVar /* out_exception */,
1055                            PP_Bool /* result */)
1056 IPC_SYNC_MESSAGE_ROUTED1_2(PpapiHostMsg_PPBVar_EnumerateProperties,
1057                            ppapi::proxy::SerializedVar /* object */,
1058                            std::vector<ppapi::proxy::SerializedVar> /* props */,
1059                            ppapi::proxy::SerializedVar /* out_exception */)
1060 IPC_SYNC_MESSAGE_ROUTED3_1(PpapiHostMsg_PPBVar_SetPropertyDeprecated,
1061                            ppapi::proxy::SerializedVar /* object */,
1062                            ppapi::proxy::SerializedVar /* name */,
1063                            ppapi::proxy::SerializedVar /* value */,
1064                            ppapi::proxy::SerializedVar /* out_exception */)
1065 IPC_SYNC_MESSAGE_ROUTED3_2(PpapiHostMsg_PPBVar_CallDeprecated,
1066                            ppapi::proxy::SerializedVar /* object */,
1067                            ppapi::proxy::SerializedVar /* method_name */,
1068                            std::vector<ppapi::proxy::SerializedVar> /* args */,
1069                            ppapi::proxy::SerializedVar /* out_exception */,
1070                            ppapi::proxy::SerializedVar /* result */)
1071 IPC_SYNC_MESSAGE_ROUTED2_2(PpapiHostMsg_PPBVar_Construct,
1072                            ppapi::proxy::SerializedVar /* object */,
1073                            std::vector<ppapi::proxy::SerializedVar> /* args */,
1074                            ppapi::proxy::SerializedVar /* out_exception */,
1075                            ppapi::proxy::SerializedVar /* result */)
1076 IPC_SYNC_MESSAGE_ROUTED2_2(PpapiHostMsg_PPBVar_IsInstanceOfDeprecated,
1077                            ppapi::proxy::SerializedVar /* var */,
1078                            int64 /* object_class */,
1079                            int64 /* object-data */,
1080                            PP_Bool /* result */)
1081 IPC_SYNC_MESSAGE_ROUTED3_1(PpapiHostMsg_PPBVar_CreateObjectDeprecated,
1082                            PP_Instance /* instance */,
1083                            int64 /* object_class */,
1084                            int64 /* object_data */,
1085                            ppapi::proxy::SerializedVar /* result */)
1086
1087 #if !defined(OS_NACL) && !defined(NACL_WIN64)
1088 // PPB_Broker.
1089 IPC_SYNC_MESSAGE_ROUTED1_1(PpapiHostMsg_PPBBroker_Create,
1090                            PP_Instance /* instance */,
1091                            ppapi::HostResource /* result_resource */)
1092 IPC_MESSAGE_ROUTED1(PpapiHostMsg_PPBBroker_Connect,
1093                     ppapi::HostResource /* broker */)
1094
1095 // PPB_Buffer.
1096 IPC_SYNC_MESSAGE_ROUTED2_2(
1097     PpapiHostMsg_PPBBuffer_Create,
1098     PP_Instance /* instance */,
1099     uint32_t /* size */,
1100     ppapi::HostResource /* result_resource */,
1101     ppapi::proxy::SerializedHandle /* result_shm_handle */)
1102
1103 // PPB_ContentDecryptor_Dev messages handled in PPB_Instance_Proxy.
1104 IPC_MESSAGE_ROUTED2(PpapiHostMsg_PPBInstance_PromiseResolved,
1105                     PP_Instance /* instance */,
1106                     uint32_t /* promise_id */)
1107 IPC_MESSAGE_ROUTED3(PpapiHostMsg_PPBInstance_PromiseResolvedWithSession,
1108                     PP_Instance /* instance */,
1109                     uint32_t /* promise_id */,
1110                     ppapi::proxy::SerializedVar /* web_session_id, String */)
1111 IPC_MESSAGE_ROUTED3(PpapiHostMsg_PPBInstance_PromiseResolvedWithKeyIds,
1112                     PP_Instance /* instance */,
1113                     uint32_t /* promise_id */,
1114                     std::vector<std::vector<uint8_t> > /* key_ids */)
1115 IPC_MESSAGE_ROUTED5(PpapiHostMsg_PPBInstance_PromiseRejected,
1116                     PP_Instance /* instance */,
1117                     uint32_t /* promise_id */,
1118                     PP_CdmExceptionCode /* exception_code */,
1119                     int32_t /* system_code */,
1120                     ppapi::proxy::SerializedVar /* error_description, String */)
1121 IPC_MESSAGE_ROUTED4(PpapiHostMsg_PPBInstance_SessionMessage,
1122                     PP_Instance /* instance */,
1123                     ppapi::proxy::SerializedVar /* web_session_id, String */,
1124                     ppapi::proxy::SerializedVar /* message, ArrayBuffer */,
1125                     ppapi::proxy::SerializedVar /* destination_url, String */)
1126 IPC_MESSAGE_ROUTED3(PpapiHostMsg_PPBInstance_SessionKeysChange,
1127                     PP_Instance /* instance */,
1128                     std::string /* web_session_id */,
1129                     PP_Bool /* has_additional_usable_key */)
1130 IPC_MESSAGE_ROUTED3(PpapiHostMsg_PPBInstance_SessionExpirationChange,
1131                     PP_Instance /* instance */,
1132                     std::string /* web_session_id */,
1133                     PP_Time /* new_expiry_time */)
1134 IPC_MESSAGE_ROUTED2(PpapiHostMsg_PPBInstance_SessionReady,
1135                     PP_Instance /* instance */,
1136                     ppapi::proxy::SerializedVar /* web_session_id, String */)
1137 IPC_MESSAGE_ROUTED2(PpapiHostMsg_PPBInstance_SessionClosed,
1138                     PP_Instance /* instance */,
1139                     ppapi::proxy::SerializedVar /* web_session_id, String */)
1140 IPC_MESSAGE_ROUTED5(PpapiHostMsg_PPBInstance_SessionError,
1141                     PP_Instance /* instance */,
1142                     ppapi::proxy::SerializedVar /* web_session_id, String */,
1143                     PP_CdmExceptionCode /* exception_code */,
1144                     int32_t /* system_code */,
1145                     ppapi::proxy::SerializedVar /* error_description, String */)
1146 IPC_MESSAGE_ROUTED3(PpapiHostMsg_PPBInstance_DeliverBlock,
1147                     PP_Instance /* instance */,
1148                     PP_Resource /* decrypted_block, PPB_Buffer_Dev */,
1149                     std::string /* serialized_block_info */)
1150 IPC_MESSAGE_ROUTED4(PpapiHostMsg_PPBInstance_DecoderInitializeDone,
1151                     PP_Instance /* instance */,
1152                     PP_DecryptorStreamType /* decoder_type */,
1153                     uint32_t /* request_id */,
1154                     PP_Bool /* success */)
1155 IPC_MESSAGE_ROUTED3(PpapiHostMsg_PPBInstance_DecoderDeinitializeDone,
1156                     PP_Instance /* instance */,
1157                     PP_DecryptorStreamType /* decoder_type */,
1158                     uint32_t /* request_id */)
1159 IPC_MESSAGE_ROUTED3(PpapiHostMsg_PPBInstance_DecoderResetDone,
1160                     PP_Instance /* instance */,
1161                     PP_DecryptorStreamType /* decoder_type */,
1162                     uint32_t /* request_id */)
1163 IPC_MESSAGE_ROUTED3(PpapiHostMsg_PPBInstance_DeliverFrame,
1164                     PP_Instance /* instance */,
1165                     PP_Resource /* decrypted_frame, PPB_Buffer_Dev */,
1166                     std::string /* serialized_block_info */)
1167 IPC_MESSAGE_ROUTED3(PpapiHostMsg_PPBInstance_DeliverSamples,
1168                     PP_Instance /* instance */,
1169                     PP_Resource /* audio_frames, PPB_Buffer_Dev */,
1170                     std::string /* serialized_block_info */)
1171 #endif  // !defined(OS_NACL) && !defined(NACL_WIN64)
1172
1173 // PPB_Testing.
1174 IPC_SYNC_MESSAGE_ROUTED3_1(
1175     PpapiHostMsg_PPBTesting_ReadImageData,
1176     ppapi::HostResource /* device_context_2d */,
1177     ppapi::HostResource /* image */,
1178     PP_Point /* top_left */,
1179     PP_Bool /* result */)
1180 IPC_SYNC_MESSAGE_ROUTED1_1(PpapiHostMsg_PPBTesting_GetLiveObjectsForInstance,
1181                            PP_Instance /* instance */,
1182                            uint32 /* result */)
1183 IPC_SYNC_MESSAGE_ROUTED2_0(PpapiHostMsg_PPBTesting_SimulateInputEvent,
1184                            PP_Instance /* instance */,
1185                            ppapi::InputEventData /* input_event */)
1186 IPC_SYNC_MESSAGE_ROUTED1_0(
1187     PpapiHostMsg_PPBTesting_SetMinimumArrayBufferSizeForShmem,
1188     uint32_t /* threshold */)
1189
1190 #if !defined(OS_NACL) && !defined(NACL_WIN64)
1191
1192 // PPB_VideoDecoder_Dev.
1193 // (Messages from plugin to renderer.)
1194 IPC_SYNC_MESSAGE_ROUTED3_1(PpapiHostMsg_PPBVideoDecoder_Create,
1195                            PP_Instance /* instance */,
1196                            ppapi::HostResource /* context */,
1197                            PP_VideoDecoder_Profile /* profile */,
1198                            ppapi::HostResource /* result */)
1199 IPC_MESSAGE_ROUTED4(PpapiHostMsg_PPBVideoDecoder_Decode,
1200                     ppapi::HostResource /* video_decoder */,
1201                     ppapi::HostResource /* bitstream buffer */,
1202                     int32 /* bitstream buffer id */,
1203                     uint32 /* size of buffer */)
1204 IPC_MESSAGE_ROUTED2(PpapiHostMsg_PPBVideoDecoder_AssignPictureBuffers,
1205                     ppapi::HostResource /* video_decoder */,
1206                     std::vector<PP_PictureBuffer_Dev> /* picture buffers */)
1207 IPC_MESSAGE_ROUTED2(PpapiHostMsg_PPBVideoDecoder_ReusePictureBuffer,
1208                     ppapi::HostResource /* video_decoder */,
1209                     int32_t /* picture buffer id */)
1210 IPC_MESSAGE_ROUTED1(PpapiHostMsg_PPBVideoDecoder_Flush,
1211                     ppapi::HostResource /* video_decoder */)
1212 IPC_MESSAGE_ROUTED1(PpapiHostMsg_PPBVideoDecoder_Reset,
1213                     ppapi::HostResource /* video_decoder */)
1214 IPC_SYNC_MESSAGE_ROUTED1_0(PpapiHostMsg_PPBVideoDecoder_Destroy,
1215                            ppapi::HostResource /* video_decoder */)
1216
1217 // PPB_VideoDecoder_Dev.
1218 // (Messages from renderer to plugin to notify it to run callbacks.)
1219 IPC_MESSAGE_ROUTED3(PpapiMsg_PPBVideoDecoder_EndOfBitstreamACK,
1220                     ppapi::HostResource /* video_decoder */,
1221                     int32_t /* bitstream buffer id */,
1222                     int32_t /* PP_CompletionCallback result */)
1223 IPC_MESSAGE_ROUTED2(PpapiMsg_PPBVideoDecoder_FlushACK,
1224                     ppapi::HostResource /* video_decoder */,
1225                     int32_t /* PP_CompletionCallback result  */)
1226 IPC_MESSAGE_ROUTED2(PpapiMsg_PPBVideoDecoder_ResetACK,
1227                     ppapi::HostResource /* video_decoder */,
1228                     int32_t /* PP_CompletionCallback result */)
1229
1230 // PPP_VideoDecoder_Dev.
1231 IPC_MESSAGE_ROUTED4(PpapiMsg_PPPVideoDecoder_ProvidePictureBuffers,
1232                     ppapi::HostResource /* video_decoder */,
1233                     uint32_t /* requested number of buffers */,
1234                     PP_Size /* dimensions of buffers */,
1235                     uint32_t /* texture_target */)
1236 IPC_MESSAGE_ROUTED2(PpapiMsg_PPPVideoDecoder_DismissPictureBuffer,
1237                     ppapi::HostResource /* video_decoder */,
1238                     int32_t /* picture buffer id */)
1239 IPC_MESSAGE_ROUTED2(PpapiMsg_PPPVideoDecoder_PictureReady,
1240                     ppapi::HostResource /* video_decoder */,
1241                     PP_Picture_Dev /* output picture */)
1242 IPC_MESSAGE_ROUTED2(PpapiMsg_PPPVideoDecoder_NotifyError,
1243                     ppapi::HostResource /* video_decoder */,
1244                     PP_VideoDecodeError_Dev /* error */)
1245 #endif  // !defined(OS_NACL) && !defined(NACL_WIN64)
1246
1247 // PPB_X509Certificate_Private
1248 IPC_SYNC_MESSAGE_CONTROL1_2(PpapiHostMsg_PPBX509Certificate_ParseDER,
1249                             std::vector<char> /* der */,
1250                             bool /* succeeded */,
1251                             ppapi::PPB_X509Certificate_Fields /* result */)
1252
1253 //-----------------------------------------------------------------------------
1254 // Resource call/reply messages.
1255 //
1256 // These are the new-style resource implementations where the resource is only
1257 // implemented in the proxy and "resource messages" are sent between this and a
1258 // host object. Resource messages are a wrapper around some general routing
1259 // information and a separate message of a type defined by the specific resource
1260 // sending/receiving it. The extra paremeters allow the nested message to be
1261 // routed automatically to the correct resource.
1262
1263 // Notification that a resource has been created in the plugin. The nested
1264 // message will be resource-type-specific.
1265 IPC_MESSAGE_CONTROL3(PpapiHostMsg_ResourceCreated,
1266                      ppapi::proxy::ResourceMessageCallParams /* call_params */,
1267                      PP_Instance  /* instance */,
1268                      IPC::Message /* nested_msg */)
1269
1270 // Notification that a resource has been destroyed in the plugin.
1271 IPC_MESSAGE_CONTROL1(PpapiHostMsg_ResourceDestroyed,
1272                      PP_Resource /* resource */)
1273
1274 // Most resources are created by the plugin, which then sends a ResourceCreated
1275 // message to create a corresponding ResourceHost in the renderer or browser
1276 // host process. However, some resources are first created in the host and
1277 // "pushed" or returned to the plugin.
1278 //
1279 // In this case, the host will create a "pending" ResourceHost object which
1280 // is identified by an ID. The ID is sent to the plugin process and the
1281 // PluginResource object is created. This message is sent from the plugin to
1282 // the host process to connect the PluginResource and the pending ResourceHost
1283 // (at which point, it's no longer pending).
1284 IPC_MESSAGE_CONTROL2(PpapiHostMsg_AttachToPendingHost,
1285                      PP_Resource /* resource */,
1286                      int /* pending_host_id */)
1287
1288 // A resource call is a request from the plugin to the host. It may or may not
1289 // require a reply, depending on the params. The nested message will be
1290 // resource-type-specific.
1291 IPC_MESSAGE_CONTROL2(PpapiHostMsg_ResourceCall,
1292                      ppapi::proxy::ResourceMessageCallParams /* call_params */,
1293                      IPC::Message /* nested_msg */)
1294 IPC_MESSAGE_CONTROL3(PpapiHostMsg_InProcessResourceCall,
1295                      int /* routing_id */,
1296                      ppapi::proxy::ResourceMessageCallParams /* call_params */,
1297                      IPC::Message /* nested_msg */)
1298
1299 // A resource reply is a response to a ResourceCall from a host to the
1300 // plugin. The resource ID + sequence number in the params will correspond to
1301 // that of the previous ResourceCall.
1302 IPC_MESSAGE_CONTROL2(
1303     PpapiPluginMsg_ResourceReply,
1304     ppapi::proxy::ResourceMessageReplyParams /* reply_params */,
1305     IPC::Message /* nested_msg */)
1306 IPC_MESSAGE_ROUTED2(
1307     PpapiHostMsg_InProcessResourceReply,
1308     ppapi::proxy::ResourceMessageReplyParams /* reply_params */,
1309     IPC::Message /* nested_msg */)
1310
1311 IPC_SYNC_MESSAGE_CONTROL2_2(PpapiHostMsg_ResourceSyncCall,
1312     ppapi::proxy::ResourceMessageCallParams /* call_params */,
1313     IPC::Message /* nested_msg */,
1314     ppapi::proxy::ResourceMessageReplyParams /* reply_params */,
1315     IPC::Message /* reply_msg */)
1316
1317 // This message is sent from the renderer to the browser when it wants to create
1318 // ResourceHosts in the browser. It contains the process ID of the plugin and
1319 // the instance of the plugin for which to create the resource for. params
1320 // contains the sequence number for the message to track the response.
1321 // The nested messages are ResourceHost creation messages.
1322 IPC_MESSAGE_CONTROL5(
1323     PpapiHostMsg_CreateResourceHostsFromHost,
1324     int /* routing_id */,
1325     int /* child_process_id */,
1326     ppapi::proxy::ResourceMessageCallParams /* params */,
1327     PP_Instance /* instance */,
1328     std::vector<IPC::Message> /* nested_msgs */)
1329
1330 // This message is sent from the browser to the renderer when it has created
1331 // ResourceHosts for the renderer. It contains the sequence number that was sent
1332 // in the request and the IDs of the pending ResourceHosts which were created in
1333 // the browser. These IDs are only useful for the plugin which can attach to the
1334 // ResourceHosts in the browser.
1335 IPC_MESSAGE_ROUTED2(
1336     PpapiHostMsg_CreateResourceHostsFromHostReply,
1337     int32_t /* sequence */,
1338     std::vector<int> /* pending_host_ids */)
1339
1340 //-----------------------------------------------------------------------------
1341 // Messages for resources using call/reply above.
1342
1343 // Broker ----------------------------------------------------------------------
1344 IPC_MESSAGE_CONTROL0(PpapiHostMsg_Broker_Create)
1345
1346 // Queries whether the plugin has permission to connect to the Pepper broker.
1347 // The response is contained in the error value of the
1348 // ResourceMessageReplyParams in the reply message.
1349 IPC_MESSAGE_CONTROL0(PpapiHostMsg_Broker_IsAllowed)
1350
1351 // UMA
1352 IPC_MESSAGE_CONTROL0(PpapiHostMsg_UMA_Create)
1353 IPC_MESSAGE_CONTROL5(PpapiHostMsg_UMA_HistogramCustomTimes,
1354                      std::string /* name */,
1355                      int64_t /* sample */,
1356                      int64_t /* min */,
1357                      int64_t /* max */,
1358                      uint32_t /* bucket_count */)
1359 IPC_MESSAGE_CONTROL5(PpapiHostMsg_UMA_HistogramCustomCounts,
1360                      std::string /* name */,
1361                      int32_t /* sample */,
1362                      int32_t /* min */,
1363                      int32_t /* max */,
1364                      uint32_t /* bucket_count */)
1365 IPC_MESSAGE_CONTROL3(PpapiHostMsg_UMA_HistogramEnumeration,
1366                      std::string /* name */,
1367                      int32_t /* sample */,
1368                      int32_t /* boundary_value */)
1369 IPC_MESSAGE_CONTROL0(PpapiHostMsg_UMA_IsCrashReportingEnabled)
1370 IPC_MESSAGE_CONTROL0(PpapiPluginMsg_UMA_IsCrashReportingEnabledReply)
1371
1372 // Compositor
1373 IPC_MESSAGE_CONTROL0(PpapiHostMsg_Compositor_Create)
1374 IPC_MESSAGE_CONTROL2(PpapiHostMsg_Compositor_CommitLayers,
1375                      std::vector<ppapi::CompositorLayerData> /* layers */,
1376                      bool /* reset */)
1377 IPC_MESSAGE_CONTROL0(PpapiPluginMsg_Compositor_CommitLayersReply)
1378 IPC_MESSAGE_CONTROL3(PpapiPluginMsg_Compositor_ReleaseResource,
1379                      int32_t /* id */,
1380                      uint32_t /* sync_point */,
1381                      bool /* is_lost */)
1382
1383 // File chooser.
1384 IPC_MESSAGE_CONTROL0(PpapiHostMsg_FileChooser_Create)
1385 IPC_MESSAGE_CONTROL4(PpapiHostMsg_FileChooser_Show,
1386                      bool /* save_as */,
1387                      bool /* open_multiple */,
1388                      std::string /* suggested_file_name */,
1389                      std::vector<std::string> /* accept_mime_types */)
1390 IPC_MESSAGE_CONTROL1(PpapiPluginMsg_FileChooser_ShowReply,
1391                      std::vector<ppapi::FileRefCreateInfo> /* files */)
1392
1393 // FileIO
1394 IPC_MESSAGE_CONTROL0(PpapiHostMsg_FileIO_Create)
1395 IPC_MESSAGE_CONTROL2(PpapiHostMsg_FileIO_Open,
1396                      PP_Resource /* file_ref_resource */,
1397                      int32_t /* open_flags */)
1398 IPC_MESSAGE_CONTROL2(PpapiPluginMsg_FileIO_OpenReply,
1399                      PP_Resource /* quota_file_system */,
1400                      int64_t /* file_size */)
1401 IPC_MESSAGE_CONTROL1(PpapiHostMsg_FileIO_Close,
1402                      ppapi::FileGrowth /* file_growth */)
1403 IPC_MESSAGE_CONTROL2(PpapiHostMsg_FileIO_Touch,
1404                      PP_Time /* last_access_time */,
1405                      PP_Time /* last_modified_time */)
1406 IPC_MESSAGE_CONTROL1(PpapiHostMsg_FileIO_SetLength,
1407                      int64_t /* length */)
1408 IPC_MESSAGE_CONTROL0(PpapiHostMsg_FileIO_Flush)
1409 IPC_MESSAGE_CONTROL0(PpapiHostMsg_FileIO_RequestOSFileHandle)
1410 IPC_MESSAGE_CONTROL0(PpapiPluginMsg_FileIO_RequestOSFileHandleReply)
1411 IPC_MESSAGE_CONTROL0(PpapiPluginMsg_FileIO_GeneralReply)
1412
1413 // FileRef
1414 // Creates a FileRef to a path on an external file system. This message may
1415 // only be sent from the renderer.
1416 IPC_MESSAGE_CONTROL1(PpapiHostMsg_FileRef_CreateForRawFS,
1417                      base::FilePath /* external_path */)
1418
1419 // Creates a FileRef to a path on a file system that uses fileapi.
1420 // This message may be sent from the renderer or the plugin.
1421 IPC_MESSAGE_CONTROL2(PpapiHostMsg_FileRef_CreateForFileAPI,
1422                      PP_Resource /* file_system */,
1423                      std::string /* internal_path */)
1424
1425 // Requests that the browser create a directory at the location indicated by
1426 // the FileRef.
1427 IPC_MESSAGE_CONTROL1(PpapiHostMsg_FileRef_MakeDirectory,
1428                      int32_t /* make_directory_flags */)
1429 IPC_MESSAGE_CONTROL0(PpapiPluginMsg_FileRef_MakeDirectoryReply)
1430
1431 // Requests that the browser update the last accessed and last modified times
1432 // at the location indicated by the FileRef.
1433 IPC_MESSAGE_CONTROL2(PpapiHostMsg_FileRef_Touch,
1434                      PP_Time /* last_accessed */,
1435                      PP_Time /* last_modified */)
1436 IPC_MESSAGE_CONTROL0(PpapiPluginMsg_FileRef_TouchReply)
1437
1438 // Requests that the browser delete a file or directory at the location
1439 // indicated by the FileRef.
1440 IPC_MESSAGE_CONTROL0(PpapiHostMsg_FileRef_Delete)
1441 IPC_MESSAGE_CONTROL0(PpapiPluginMsg_FileRef_DeleteReply)
1442
1443 // Requests that the browser rename a file or directory at the location
1444 // indicated by the FileRef.
1445 IPC_MESSAGE_CONTROL1(PpapiHostMsg_FileRef_Rename,
1446                      PP_Resource /* new_file_ref */)
1447 IPC_MESSAGE_CONTROL0(PpapiPluginMsg_FileRef_RenameReply)
1448
1449 // Requests that the browser retrieve metadata information for a file or
1450 // directory at the location indicated by the FileRef.
1451 IPC_MESSAGE_CONTROL0(PpapiHostMsg_FileRef_Query)
1452 IPC_MESSAGE_CONTROL1(PpapiPluginMsg_FileRef_QueryReply,
1453                      PP_FileInfo /* file_info */)
1454
1455 // Requests that the browser retrieve then entries in a directory at the
1456 // location indicated by the FileRef.
1457 IPC_MESSAGE_CONTROL0(PpapiHostMsg_FileRef_ReadDirectoryEntries)
1458
1459 // FileRefCreateInfo does not provide file type information, so two
1460 // corresponding vectors are returned.
1461 IPC_MESSAGE_CONTROL2(PpapiPluginMsg_FileRef_ReadDirectoryEntriesReply,
1462                      std::vector<ppapi::FileRefCreateInfo> /* files */,
1463                      std::vector<PP_FileType> /* file_types */)
1464
1465 // Requests that the browser reply with the absolute path to the indicated
1466 // file.
1467 IPC_MESSAGE_CONTROL0(PpapiHostMsg_FileRef_GetAbsolutePath)
1468 IPC_MESSAGE_CONTROL1(PpapiPluginMsg_FileRef_GetAbsolutePathReply,
1469                      std::string /* absolute_path */)
1470
1471 // FileSystem
1472 IPC_MESSAGE_CONTROL1(PpapiHostMsg_FileSystem_Create,
1473                      PP_FileSystemType /* type */)
1474 IPC_MESSAGE_CONTROL1(PpapiHostMsg_FileSystem_Open,
1475                      int64_t /* expected_size */)
1476 IPC_MESSAGE_CONTROL0(PpapiPluginMsg_FileSystem_OpenReply)
1477 IPC_MESSAGE_CONTROL2(PpapiHostMsg_FileSystem_InitIsolatedFileSystem,
1478                      std::string /* fsid */,
1479                      PP_IsolatedFileSystemType_Private /* type */)
1480 IPC_MESSAGE_CONTROL0(PpapiPluginMsg_FileSystem_InitIsolatedFileSystemReply)
1481 // Passed from renderer to browser. Creates an already-open file system with a
1482 // given |root_url| and |file_system_type|.
1483 IPC_MESSAGE_CONTROL2(PpapiHostMsg_FileSystem_CreateFromRenderer,
1484                      std::string /* root_url */,
1485                      PP_FileSystemType /* file_system_type */)
1486 // Nested within a ResourceVar for file systems being passed from the renderer
1487 // to the plugin. Creates an already-open file system resource on the plugin,
1488 // linked to the existing resource host given in the ResourceVar.
1489 IPC_MESSAGE_CONTROL1(PpapiPluginMsg_FileSystem_CreateFromPendingHost,
1490                      PP_FileSystemType /* file_system_type */)
1491 IPC_MESSAGE_CONTROL2(PpapiHostMsg_FileSystem_ReserveQuota,
1492                      int64_t /* amount */,
1493                      ppapi::FileGrowthMap /* file_growths */)
1494 IPC_MESSAGE_CONTROL2(PpapiPluginMsg_FileSystem_ReserveQuotaReply,
1495                      int64_t /* amount */,
1496                      ppapi::FileSizeMap /* file_sizes */)
1497
1498 // Gamepad.
1499 IPC_MESSAGE_CONTROL0(PpapiHostMsg_Gamepad_Create)
1500
1501 // Requests that the gamepad host send the shared memory handle to the plugin
1502 // process.
1503 IPC_MESSAGE_CONTROL0(PpapiHostMsg_Gamepad_RequestMemory)
1504
1505 // Reply to a RequestMemory call. This supplies the shared memory handle. The
1506 // actual handle is passed in the ReplyParams struct.
1507 IPC_MESSAGE_CONTROL0(PpapiPluginMsg_Gamepad_SendMemory)
1508
1509
1510 // Graphics2D, plugin -> host
1511 IPC_MESSAGE_CONTROL2(PpapiHostMsg_Graphics2D_Create,
1512                      PP_Size /* size */,
1513                      PP_Bool /* is_always_opaque */)
1514 IPC_MESSAGE_CONTROL4(PpapiHostMsg_Graphics2D_PaintImageData,
1515                      ppapi::HostResource /* image_data */,
1516                      PP_Point /* top_left */,
1517                      bool /* src_rect_specified */,
1518                      PP_Rect /* src_rect */)
1519 IPC_MESSAGE_CONTROL3(PpapiHostMsg_Graphics2D_Scroll,
1520                      bool /* clip_specified */,
1521                      PP_Rect /* clip */,
1522                      PP_Point /* amount */)
1523 IPC_MESSAGE_CONTROL1(PpapiHostMsg_Graphics2D_ReplaceContents,
1524                      ppapi::HostResource /* image_data */)
1525 IPC_MESSAGE_CONTROL1(PpapiHostMsg_Graphics2D_SetScale,
1526                      float /* scale */)
1527
1528 // Graphics2D, plugin -> host -> plugin
1529 IPC_MESSAGE_CONTROL1(PpapiHostMsg_Graphics2D_Flush,
1530                      std::vector<ui::LatencyInfo> /* latency_info */)
1531 IPC_MESSAGE_CONTROL0(PpapiPluginMsg_Graphics2D_FlushAck)
1532
1533 IPC_MESSAGE_CONTROL2(PpapiHostMsg_Graphics2D_ReadImageData,
1534                      PP_Resource /* image */,
1535                      PP_Point /* top_left */)
1536 IPC_MESSAGE_CONTROL0(PpapiPluginMsg_Graphics2D_ReadImageDataAck)
1537
1538 // IsolatedFileSystem
1539 IPC_MESSAGE_CONTROL0(PpapiHostMsg_IsolatedFileSystem_Create)
1540 IPC_MESSAGE_CONTROL1(PpapiHostMsg_IsolatedFileSystem_BrowserOpen,
1541                      PP_IsolatedFileSystemType_Private /* type */)
1542 IPC_MESSAGE_CONTROL1(PpapiPluginMsg_IsolatedFileSystem_BrowserOpenReply,
1543                      std::string /* fsid */)
1544
1545 // MediaStream -----------------------------------------------------------------
1546 IPC_MESSAGE_CONTROL1(PpapiPluginMsg_MediaStreamAudioTrack_CreateFromPendingHost,
1547                      std::string /* track_id */)
1548 IPC_MESSAGE_CONTROL1(
1549     PpapiHostMsg_MediaStreamAudioTrack_Configure,
1550     ppapi::MediaStreamAudioTrackShared::Attributes /* attributes */)
1551 IPC_MESSAGE_CONTROL0(PpapiPluginMsg_MediaStreamAudioTrack_ConfigureReply)
1552 IPC_MESSAGE_CONTROL1(PpapiPluginMsg_MediaStreamVideoTrack_CreateFromPendingHost,
1553                      std::string /* track_id */)
1554 IPC_MESSAGE_CONTROL0(PpapiHostMsg_MediaStreamVideoTrack_Create)
1555 IPC_MESSAGE_CONTROL1(
1556     PpapiHostMsg_MediaStreamVideoTrack_Configure,
1557     ppapi::MediaStreamVideoTrackShared::Attributes /* attributes */)
1558 IPC_MESSAGE_CONTROL1(PpapiPluginMsg_MediaStreamVideoTrack_ConfigureReply,
1559                      std::string /* track_id */)
1560
1561 // Message for init buffers. It also takes a shared memory handle which is put
1562 // in the outer ResourceReplyMessage.
1563 IPC_MESSAGE_CONTROL3(PpapiPluginMsg_MediaStreamTrack_InitBuffers,
1564                      int32_t /* number_of_buffers */,
1565                      int32_t /* buffer_size */,
1566                      bool /* readonly */)
1567 IPC_MESSAGE_CONTROL1(PpapiPluginMsg_MediaStreamTrack_EnqueueBuffer,
1568                      int32_t /* index */)
1569 IPC_MESSAGE_CONTROL1(PpapiHostMsg_MediaStreamTrack_EnqueueBuffer,
1570                      int32_t /* index */)
1571 IPC_MESSAGE_CONTROL1(PpapiPluginMsg_MediaStreamTrack_EnqueueBuffers,
1572                      std::vector<int32_t> /* indices */)
1573 IPC_MESSAGE_CONTROL0(PpapiHostMsg_MediaStreamTrack_Close)
1574
1575 // NetworkMonitor.
1576 IPC_MESSAGE_CONTROL0(PpapiHostMsg_NetworkMonitor_Create)
1577 IPC_MESSAGE_CONTROL1(PpapiPluginMsg_NetworkMonitor_NetworkList,
1578                      ppapi::proxy::SerializedNetworkList /* network_list */)
1579 IPC_MESSAGE_CONTROL0(PpapiPluginMsg_NetworkMonitor_Forbidden)
1580
1581 // NetworkProxy ----------------------------------------------------------------
1582 IPC_MESSAGE_CONTROL0(PpapiHostMsg_NetworkProxy_Create)
1583
1584 // Query the browser for the proxy server to use for the given URL.
1585 IPC_MESSAGE_CONTROL1(PpapiHostMsg_NetworkProxy_GetProxyForURL,
1586                      std::string /* url */)
1587
1588 // Reply message for GetProxyForURL containing the proxy server.
1589 IPC_MESSAGE_CONTROL1(PpapiPluginMsg_NetworkProxy_GetProxyForURLReply,
1590                      std::string /* proxy */)
1591
1592 // TrueTypeFont.
1593 IPC_MESSAGE_CONTROL0(PpapiHostMsg_TrueTypeFontSingleton_Create)
1594 IPC_MESSAGE_CONTROL0(PpapiHostMsg_TrueTypeFontSingleton_GetFontFamilies)
1595 IPC_MESSAGE_CONTROL1(PpapiPluginMsg_TrueTypeFontSingleton_GetFontFamiliesReply,
1596                      std::vector<std::string> /* font_families */)
1597 IPC_MESSAGE_CONTROL1(PpapiHostMsg_TrueTypeFontSingleton_GetFontsInFamily,
1598                      std::string /* family */)
1599 IPC_MESSAGE_CONTROL1(PpapiPluginMsg_TrueTypeFontSingleton_GetFontsInFamilyReply,
1600                      std::vector<ppapi::proxy::SerializedTrueTypeFontDesc>
1601                          /* fonts */)
1602 IPC_MESSAGE_CONTROL1(PpapiHostMsg_TrueTypeFont_Create,
1603                      ppapi::proxy::SerializedTrueTypeFontDesc /* desc */)
1604 // Unsolicited reply to return the actual font's desc to the plugin.
1605 IPC_MESSAGE_CONTROL2(PpapiPluginMsg_TrueTypeFont_CreateReply,
1606                      ppapi::proxy::SerializedTrueTypeFontDesc /* desc */,
1607                      int32_t /* result */)
1608 IPC_MESSAGE_CONTROL0(PpapiHostMsg_TrueTypeFont_GetTableTags)
1609 IPC_MESSAGE_CONTROL1(PpapiPluginMsg_TrueTypeFont_GetTableTagsReply,
1610                      std::vector<uint32_t> /* tags */)
1611 IPC_MESSAGE_CONTROL3(PpapiHostMsg_TrueTypeFont_GetTable,
1612                      uint32_t /* table */,
1613                      int32_t /* offset */,
1614                      int32_t /* max_data_length */)
1615 IPC_MESSAGE_CONTROL1(PpapiPluginMsg_TrueTypeFont_GetTableReply,
1616                      std::string /* data */)
1617
1618 // Host Resolver ---------------------------------------------------------------
1619 // Creates a PPB_HostResolver resource.
1620 IPC_MESSAGE_CONTROL0(PpapiHostMsg_HostResolver_Create)
1621
1622 // Creates a PPB_HostResolver_Private resource.
1623 IPC_MESSAGE_CONTROL0(PpapiHostMsg_HostResolver_CreatePrivate)
1624
1625 // Resolves the given hostname.
1626 IPC_MESSAGE_CONTROL2(PpapiHostMsg_HostResolver_Resolve,
1627                      ppapi::HostPortPair /* host_port */,
1628                      PP_HostResolver_Private_Hint /* hint */)
1629
1630 // This message is a reply to HostResolver_Resolve. On success,
1631 // |canonical_name| contains the canonical name of the host; |net_address_list|
1632 // is a list of network addresses. On failure, both fields are set to empty.
1633 IPC_MESSAGE_CONTROL2(PpapiPluginMsg_HostResolver_ResolveReply,
1634                      std::string /* canonical_name */,
1635                      std::vector<PP_NetAddress_Private> /* net_address_list */)
1636
1637 // Platform Verification -------------------------------------------------------
1638 IPC_MESSAGE_CONTROL0(PpapiHostMsg_PlatformVerification_Create)
1639 IPC_MESSAGE_CONTROL2(PpapiHostMsg_PlatformVerification_ChallengePlatform,
1640                      std::string /* service_id  */,
1641                      std::vector<uint8_t> /* challenge */)
1642 IPC_MESSAGE_CONTROL3(PpapiHostMsg_PlatformVerification_ChallengePlatformReply,
1643                      std::vector<uint8_t> /* signed_data */,
1644                      std::vector<uint8_t> /* signed_data_signature */,
1645                      std::string /* platform_key_certificate */)
1646
1647 // Printing.
1648 IPC_MESSAGE_CONTROL0(PpapiHostMsg_Printing_Create)
1649 IPC_MESSAGE_CONTROL0(PpapiHostMsg_Printing_GetDefaultPrintSettings)
1650 IPC_MESSAGE_CONTROL1(PpapiPluginMsg_Printing_GetDefaultPrintSettingsReply,
1651                      PP_PrintSettings_Dev /* print_settings */)
1652
1653 // TCP Socket ------------------------------------------------------------------
1654 // Creates a PPB_TCPSocket resource.
1655 IPC_MESSAGE_CONTROL1(PpapiHostMsg_TCPSocket_Create,
1656                      ppapi::TCPSocketVersion /* version */)
1657
1658 // Creates a PPB_TCPSocket_Private resource.
1659 IPC_MESSAGE_CONTROL0(PpapiHostMsg_TCPSocket_CreatePrivate)
1660
1661 IPC_MESSAGE_CONTROL1(PpapiHostMsg_TCPSocket_Bind,
1662                      PP_NetAddress_Private /* net_addr */)
1663 IPC_MESSAGE_CONTROL1(PpapiPluginMsg_TCPSocket_BindReply,
1664                      PP_NetAddress_Private /* local_addr */)
1665 IPC_MESSAGE_CONTROL2(PpapiHostMsg_TCPSocket_Connect,
1666                      std::string /* host */,
1667                      uint16_t /* port */)
1668 IPC_MESSAGE_CONTROL1(PpapiHostMsg_TCPSocket_ConnectWithNetAddress,
1669                      PP_NetAddress_Private /* net_addr */)
1670 IPC_MESSAGE_CONTROL2(PpapiPluginMsg_TCPSocket_ConnectReply,
1671                      PP_NetAddress_Private /* local_addr */,
1672                      PP_NetAddress_Private /* remote_addr */)
1673 IPC_MESSAGE_CONTROL4(PpapiHostMsg_TCPSocket_SSLHandshake,
1674                      std::string /* server_name */,
1675                      uint16_t /* server_port */,
1676                      std::vector<std::vector<char> > /* trusted_certs */,
1677                      std::vector<std::vector<char> > /* untrusted_certs */)
1678 IPC_MESSAGE_CONTROL1(PpapiPluginMsg_TCPSocket_SSLHandshakeReply,
1679                      ppapi::PPB_X509Certificate_Fields /* certificate_fields */)
1680 IPC_MESSAGE_CONTROL1(PpapiHostMsg_TCPSocket_Read,
1681                      int32_t /* bytes_to_read */)
1682 IPC_MESSAGE_CONTROL1(PpapiPluginMsg_TCPSocket_ReadReply,
1683                      std::string /* data */)
1684 IPC_MESSAGE_CONTROL1(PpapiHostMsg_TCPSocket_Write,
1685                      std::string /* data */)
1686 IPC_MESSAGE_CONTROL0(PpapiPluginMsg_TCPSocket_WriteReply)
1687 IPC_MESSAGE_CONTROL1(PpapiHostMsg_TCPSocket_Listen,
1688                      int32_t /* backlog */)
1689 IPC_MESSAGE_CONTROL0(PpapiPluginMsg_TCPSocket_ListenReply)
1690 IPC_MESSAGE_CONTROL0(PpapiHostMsg_TCPSocket_Accept)
1691 IPC_MESSAGE_CONTROL3(PpapiPluginMsg_TCPSocket_AcceptReply,
1692                      int /* pending_host_id*/,
1693                      PP_NetAddress_Private /* local_addr */,
1694                      PP_NetAddress_Private /* remote_addr */)
1695 IPC_MESSAGE_CONTROL0(PpapiHostMsg_TCPSocket_Close)
1696 IPC_MESSAGE_CONTROL2(PpapiHostMsg_TCPSocket_SetOption,
1697                      PP_TCPSocket_Option /* name */,
1698                      ppapi::SocketOptionData /* value */)
1699 IPC_MESSAGE_CONTROL0(PpapiPluginMsg_TCPSocket_SetOptionReply)
1700
1701 // TCP Server Socket -----------------------------------------------------------
1702 // Creates a PPB_TCPServerSocket_Private resource.
1703 IPC_MESSAGE_CONTROL0(PpapiHostMsg_TCPServerSocket_CreatePrivate)
1704
1705 IPC_MESSAGE_CONTROL2(PpapiHostMsg_TCPServerSocket_Listen,
1706                      PP_NetAddress_Private /* addr */,
1707                      int32_t /* backlog */)
1708 IPC_MESSAGE_CONTROL1(PpapiPluginMsg_TCPServerSocket_ListenReply,
1709                      PP_NetAddress_Private /* local_addr */)
1710 IPC_MESSAGE_CONTROL0(PpapiHostMsg_TCPServerSocket_Accept)
1711 IPC_MESSAGE_CONTROL3(PpapiPluginMsg_TCPServerSocket_AcceptReply,
1712                      int /* pending_resource_id */,
1713                      PP_NetAddress_Private /* local_addr */,
1714                      PP_NetAddress_Private /* remote_addr */)
1715 IPC_MESSAGE_CONTROL0(PpapiHostMsg_TCPServerSocket_StopListening)
1716
1717 // UDP Socket ------------------------------------------------------------------
1718 // Creates a PPB_UDPSocket resource.
1719 IPC_MESSAGE_CONTROL0(PpapiHostMsg_UDPSocket_Create)
1720
1721 // Creates a PPB_UDPSocket_Private resource.
1722 IPC_MESSAGE_CONTROL0(PpapiHostMsg_UDPSocket_CreatePrivate)
1723
1724 IPC_MESSAGE_CONTROL2(PpapiHostMsg_UDPSocket_SetOption,
1725                      PP_UDPSocket_Option /* name */,
1726                      ppapi::SocketOptionData /* value */)
1727 IPC_MESSAGE_CONTROL0(PpapiPluginMsg_UDPSocket_SetOptionReply)
1728 IPC_MESSAGE_CONTROL1(PpapiHostMsg_UDPSocket_Bind,
1729                      PP_NetAddress_Private /* net_addr */)
1730 IPC_MESSAGE_CONTROL1(PpapiPluginMsg_UDPSocket_BindReply,
1731                      PP_NetAddress_Private /* bound_addr */)
1732 IPC_MESSAGE_CONTROL3(PpapiPluginMsg_UDPSocket_PushRecvResult,
1733                      int32_t /* result */,
1734                      std::string /* data */,
1735                      PP_NetAddress_Private /* remote_addr */)
1736 IPC_MESSAGE_CONTROL0(PpapiHostMsg_UDPSocket_RecvSlotAvailable)
1737 IPC_MESSAGE_CONTROL2(PpapiHostMsg_UDPSocket_SendTo,
1738                      std::string /* data */,
1739                      PP_NetAddress_Private /* net_addr */)
1740 IPC_MESSAGE_CONTROL1(PpapiPluginMsg_UDPSocket_SendToReply,
1741                      int32_t /* bytes_written */)
1742 IPC_MESSAGE_CONTROL0(PpapiHostMsg_UDPSocket_Close)
1743
1744 // URLLoader ------------------------------------------------------------------
1745
1746 IPC_MESSAGE_CONTROL0(PpapiHostMsg_URLLoader_Create)
1747
1748 // These messages correspond to PPAPI calls and all should get a
1749 // CallbackComplete message.
1750 IPC_MESSAGE_CONTROL1(PpapiHostMsg_URLLoader_Open,
1751                      ppapi::URLRequestInfoData /* request_data */)
1752
1753 // The plugin can tell the host to defer a load to hold off on sending more
1754 // data because the buffer in the plugin is full. When defers_loading is set to
1755 // false, data streaming will resume.
1756 //
1757 // When auditing redirects (no auto follow) the load will be automatically
1758 // deferred each time we get a redirect. The plugin will reset this to false
1759 // by sending this message when it wants to continue following the redirect.
1760 //
1761 // When streaming data, the host may still send more data after this call (for
1762 // example, it could already be in-flight at the time of this request).
1763 IPC_MESSAGE_CONTROL1(PpapiHostMsg_URLLoader_SetDeferLoading,
1764                      bool /* defers_loading */)
1765
1766 // Closes the URLLoader. There is no reply.
1767 IPC_MESSAGE_CONTROL0(PpapiHostMsg_URLLoader_Close)
1768
1769 // Requests that cross-site restrictions be ignored. The plugin must have
1770 // the private permission set. Otherwise this message will be ignored by the
1771 // renderer. There is no reply.
1772 IPC_MESSAGE_CONTROL0(PpapiHostMsg_URLLoader_GrantUniversalAccess)
1773
1774 // Push notification that a response is available.
1775 IPC_MESSAGE_CONTROL1(PpapiPluginMsg_URLLoader_ReceivedResponse,
1776                      ppapi::URLResponseInfoData /* response */)
1777
1778 // Push notification with load data from the renderer. It is a custom generated
1779 // message with the response data (array of bytes stored via WriteData)
1780 // appended.
1781 IPC_MESSAGE_CONTROL0(PpapiPluginMsg_URLLoader_SendData)
1782
1783 // Push notification indicating that all data has been sent, either via
1784 // SendData or by streaming it to a file. Note that since this is a push
1785 // notification, we don't use the result field of the ResourceMessageReply.
1786 IPC_MESSAGE_CONTROL1(PpapiPluginMsg_URLLoader_FinishedLoading,
1787                      int32_t /* result */)
1788
1789 // Push notification from the renderer to the plugin to tell it about download
1790 // and upload progress. This will only be sent if the plugin has requested
1791 // progress updates, and only the fields requested by the plugin will be
1792 // valid.
1793 IPC_MESSAGE_CONTROL4(PpapiPluginMsg_URLLoader_UpdateProgress,
1794                      int64_t /* bytes_sent */,
1795                      int64_t /* total_bytes_to_be_sent */,
1796                      int64_t /* bytes_received */,
1797                      int64_t /* total_bytes_to_be_received */)
1798
1799 // Shared memory ---------------------------------------------------------------
1800
1801 // Creates shared memory on the host side, returning a handle to the shared
1802 // memory on the plugin and keeping the memory mapped in on the host.
1803 // We return a "host handle_id" that can be mapped back to the
1804 // handle on the host side by PpapiGlobals::UntrackSharedMemoryHandle().
1805 IPC_SYNC_MESSAGE_CONTROL2_2(PpapiHostMsg_SharedMemory_CreateSharedMemory,
1806                             PP_Instance /* instance */,
1807                             uint32_t /* size */,
1808                             int /* host_handle_id */,
1809                             ppapi::proxy::SerializedHandle /* plugin_handle */)
1810
1811 // MediaStream -----------------------------------------------------------------
1812
1813 // VideoDestination Private.
1814 IPC_MESSAGE_CONTROL0(PpapiHostMsg_VideoDestination_Create)
1815 IPC_MESSAGE_CONTROL1(PpapiHostMsg_VideoDestination_Open,
1816                      std::string /* stream_url */)
1817 IPC_MESSAGE_CONTROL0(PpapiPluginMsg_VideoDestination_OpenReply)
1818 IPC_MESSAGE_CONTROL2(PpapiHostMsg_VideoDestination_PutFrame,
1819                      ppapi::HostResource /* image_data */,
1820                      PP_TimeTicks /* timestamp */)
1821 IPC_MESSAGE_CONTROL0(PpapiHostMsg_VideoDestination_Close)
1822
1823 // VideoSource Private.
1824 IPC_MESSAGE_CONTROL0(PpapiHostMsg_VideoSource_Create)
1825 IPC_MESSAGE_CONTROL1(PpapiHostMsg_VideoSource_Open,
1826                      std::string /* stream_url */)
1827 IPC_MESSAGE_CONTROL0(PpapiPluginMsg_VideoSource_OpenReply)
1828 IPC_MESSAGE_CONTROL0(PpapiHostMsg_VideoSource_GetFrame)
1829 IPC_MESSAGE_CONTROL3(PpapiPluginMsg_VideoSource_GetFrameReply,
1830                      ppapi::HostResource /* resource_id */,
1831                      PP_ImageDataDesc /* image_data_desc */,
1832                      PP_TimeTicks /* timestamp */)
1833 IPC_MESSAGE_CONTROL0(PpapiHostMsg_VideoSource_Close)
1834
1835 // WebSocket -------------------------------------------------------------------
1836
1837 IPC_MESSAGE_CONTROL0(PpapiHostMsg_WebSocket_Create)
1838
1839 // Establishes the connection to a server. This message requires
1840 // WebSocket_ConnectReply as a reply message.
1841 IPC_MESSAGE_CONTROL2(PpapiHostMsg_WebSocket_Connect,
1842                      std::string /* url */,
1843                      std::vector<std::string> /* protocols */)
1844
1845 // Closes established connection with graceful closing handshake. This message
1846 // requires WebSocket_CloseReply as a reply message.
1847 IPC_MESSAGE_CONTROL2(PpapiHostMsg_WebSocket_Close,
1848                      int32_t /* code */,
1849                      std::string /* reason */)
1850
1851 // Sends a text frame to the server. No reply is defined.
1852 IPC_MESSAGE_CONTROL1(PpapiHostMsg_WebSocket_SendText,
1853                      std::string /* message */)
1854
1855 // Sends a binary frame to the server. No reply is defined.
1856 IPC_MESSAGE_CONTROL1(PpapiHostMsg_WebSocket_SendBinary,
1857                      std::vector<uint8_t> /* message */)
1858
1859 // Fails the connection. This message invokes RFC6455 defined
1860 // _Fail the WebSocket Connection_ operation. No reply is defined.
1861 IPC_MESSAGE_CONTROL1(PpapiHostMsg_WebSocket_Fail,
1862                      std::string /* message */)
1863
1864 // This message is a reply to WebSocket_Connect. If the |url| and |protocols|
1865 // are invalid, WebSocket_ConnectReply is issued immediately and it contains
1866 // proper error code in its result. Otherwise, WebSocket_ConnectReply is sent
1867 // with valid |url|, |protocol|, and result PP_OK. |protocol| is not a passed
1868 // |protocols|, but a result of opening handshake negotiation. If the
1869 // connection can not be established successfully, WebSocket_ConnectReply is
1870 // not issued, but WebSocket_ClosedReply is sent instead.
1871 IPC_MESSAGE_CONTROL2(PpapiPluginMsg_WebSocket_ConnectReply,
1872                      std::string /* url */,
1873                      std::string /* protocol */)
1874
1875 // This message is a reply to WebSocket_Close. If the operation fails,
1876 // WebSocket_CloseReply is issued immediately and it contains PP_ERROR_FAILED.
1877 // Otherwise, CloseReply will be issued after the closing handshake is
1878 // finished. All arguments will be valid iff the result is PP_OK and it means
1879 // that the client initiated closing handshake is finished gracefully.
1880 IPC_MESSAGE_CONTROL4(PpapiPluginMsg_WebSocket_CloseReply,
1881                      uint64_t /* buffered_amount */,
1882                      bool /* was_clean */,
1883                      uint16_t /* code */,
1884                      std::string /* reason */)
1885
1886 // Unsolicited reply message to transmit a receiving text frame.
1887 IPC_MESSAGE_CONTROL1(PpapiPluginMsg_WebSocket_ReceiveTextReply,
1888                      std::string /* message */)
1889
1890 // Unsolicited reply message to transmit a receiving binary frame.
1891 IPC_MESSAGE_CONTROL1(PpapiPluginMsg_WebSocket_ReceiveBinaryReply,
1892                      std::vector<uint8_t> /* message */)
1893
1894 // Unsolicited reply message to notify a error on underlying network connetion.
1895 IPC_MESSAGE_CONTROL0(PpapiPluginMsg_WebSocket_ErrorReply)
1896
1897 // Unsolicited reply message to update the buffered amount value.
1898 IPC_MESSAGE_CONTROL1(PpapiPluginMsg_WebSocket_BufferedAmountReply,
1899                      uint64_t /* buffered_amount */)
1900
1901 // Unsolicited reply message to update |state| because of incoming external
1902 // events, e.g., protocol error, or unexpected network closure.
1903 IPC_MESSAGE_CONTROL1(PpapiPluginMsg_WebSocket_StateReply,
1904                      int32_t /* state */)
1905
1906 // Unsolicited reply message to notify that the connection is closed without
1907 // any WebSocket_Close request. Server initiated closing handshake or
1908 // unexpected network errors will invoke this message.
1909 IPC_MESSAGE_CONTROL4(PpapiPluginMsg_WebSocket_ClosedReply,
1910                      uint64_t /* buffered_amount */,
1911                      bool /* was_clean */,
1912                      uint16_t /* code */,
1913                      std::string /* reason */)
1914
1915 // OutputProtection -----------------------------------------------------------
1916
1917 IPC_MESSAGE_CONTROL0(PpapiHostMsg_OutputProtection_Create)
1918 IPC_MESSAGE_CONTROL1(PpapiHostMsg_OutputProtection_EnableProtection,
1919                      uint32_t /* desired_method_mask */)
1920 IPC_MESSAGE_CONTROL0(PpapiPluginMsg_OutputProtection_EnableProtectionReply)
1921 IPC_MESSAGE_CONTROL0(PpapiHostMsg_OutputProtection_QueryStatus)
1922 IPC_MESSAGE_CONTROL2(PpapiPluginMsg_OutputProtection_QueryStatusReply,
1923                      uint32_t /* link_mask */,
1924                      uint32_t /* protection_mask */)
1925
1926 // VideoDecoder ------------------------------------------------------
1927
1928 IPC_MESSAGE_CONTROL0(PpapiHostMsg_VideoDecoder_Create)
1929 IPC_MESSAGE_CONTROL3(PpapiHostMsg_VideoDecoder_Initialize,
1930                      ppapi::HostResource /* graphics_context */,
1931                      PP_VideoProfile /* profile */,
1932                      PP_HardwareAcceleration /* acceleration */)
1933 IPC_MESSAGE_CONTROL0(PpapiPluginMsg_VideoDecoder_InitializeReply)
1934 IPC_MESSAGE_CONTROL2(PpapiHostMsg_VideoDecoder_GetShm,
1935                      uint32_t /* shm_id */,
1936                      uint32_t /* shm_size */)
1937 // On success, a shm handle is passed in the ReplyParams struct.
1938 IPC_MESSAGE_CONTROL1(PpapiPluginMsg_VideoDecoder_GetShmReply,
1939                      uint32_t /* shm_size */)
1940 IPC_MESSAGE_CONTROL3(PpapiHostMsg_VideoDecoder_Decode,
1941                      uint32_t /* shm_id */,
1942                      uint32_t /* size */,
1943                      int32_t /* decode_id */)
1944 IPC_MESSAGE_CONTROL1(PpapiPluginMsg_VideoDecoder_DecodeReply,
1945                      uint32_t /* shm_id */)
1946 IPC_MESSAGE_CONTROL4(PpapiPluginMsg_VideoDecoder_RequestTextures,
1947                      uint32_t /* num_textures */,
1948                      PP_Size /* size */,
1949                      uint32_t /* texture_target */,
1950                      std::vector<gpu::Mailbox> /* mailboxes*/)
1951 IPC_MESSAGE_CONTROL2(PpapiHostMsg_VideoDecoder_AssignTextures,
1952                      PP_Size /* size */,
1953                      std::vector<uint32_t> /* texture_ids */)
1954 IPC_MESSAGE_CONTROL3(PpapiPluginMsg_VideoDecoder_PictureReady,
1955                      int32_t /* decode_id */,
1956                      uint32_t /* texture_id */,
1957                      PP_Rect /* visible_rect */)
1958 IPC_MESSAGE_CONTROL1(PpapiHostMsg_VideoDecoder_RecyclePicture,
1959                      uint32_t /* texture_id */)
1960 IPC_MESSAGE_CONTROL1(PpapiPluginMsg_VideoDecoder_DismissPicture,
1961                      uint32_t /* texture_id */)
1962 IPC_MESSAGE_CONTROL0(PpapiHostMsg_VideoDecoder_Flush)
1963 IPC_MESSAGE_CONTROL0(PpapiPluginMsg_VideoDecoder_FlushReply)
1964 IPC_MESSAGE_CONTROL0(PpapiHostMsg_VideoDecoder_Reset)
1965 IPC_MESSAGE_CONTROL0(PpapiPluginMsg_VideoDecoder_ResetReply)
1966 IPC_MESSAGE_CONTROL1(PpapiPluginMsg_VideoDecoder_NotifyError,
1967                      int32_t /* error */)
1968
1969 #if !defined(OS_NACL) && !defined(NACL_WIN64)
1970
1971 // Audio input.
1972 IPC_MESSAGE_CONTROL0(PpapiHostMsg_AudioInput_Create)
1973 IPC_MESSAGE_CONTROL3(PpapiHostMsg_AudioInput_Open,
1974                      std::string /* device_id */,
1975                      PP_AudioSampleRate /* sample_rate */,
1976                      uint32_t /* sample_frame_count */)
1977 // Reply to an Open call. This supplies a socket handle and a shared memory
1978 // handle. Both handles are passed in the ReplyParams struct.
1979 IPC_MESSAGE_CONTROL0(PpapiPluginMsg_AudioInput_OpenReply)
1980 IPC_MESSAGE_CONTROL1(PpapiHostMsg_AudioInput_StartOrStop, bool /* capture */)
1981 IPC_MESSAGE_CONTROL0(PpapiHostMsg_AudioInput_Close)
1982
1983 // BrowserFont -----------------------------------------------------------------
1984
1985 IPC_MESSAGE_CONTROL0(PpapiHostMsg_BrowserFontSingleton_Create)
1986
1987 // Requests that the browser reply with the list of font families via
1988 // PpapiPluginMsg_BrowserFontSingleton_GetFontFamiliesReply.
1989 IPC_MESSAGE_CONTROL0(PpapiHostMsg_BrowserFontSingleton_GetFontFamilies)
1990
1991 // Reply to PpapiHostMsg_BrowserFontSingleton_GetFontFamilies with the font
1992 // family list. The |families| result is encoded by separating each family name
1993 // by a null character.
1994 IPC_MESSAGE_CONTROL1(PpapiPluginMsg_BrowserFontSingleton_GetFontFamiliesReply,
1995                      std::string /* families */)
1996
1997 // Flash -----------------------------------------------------------------------
1998
1999 IPC_MESSAGE_CONTROL0(PpapiHostMsg_Flash_Create)
2000
2001 // Message to notify the browser to register an update in system activity.
2002 IPC_MESSAGE_CONTROL0(PpapiHostMsg_Flash_UpdateActivity)
2003
2004 // Query the browser for the proxy server to use for the given URL.
2005 IPC_MESSAGE_CONTROL1(PpapiHostMsg_Flash_GetProxyForURL, std::string /* url */)
2006 // Reply message for GetProxyForURL containing the proxy server.
2007 IPC_MESSAGE_CONTROL1(PpapiPluginMsg_Flash_GetProxyForURLReply,
2008                      std::string /* proxy */)
2009
2010 // Queries the browser for the local time zone offset for a given time.
2011 IPC_MESSAGE_CONTROL1(PpapiHostMsg_Flash_GetLocalTimeZoneOffset,
2012                      base::Time /* time */)
2013 // Reply to GetLocalTimeZoneOffset containing the time zone offset as a double.
2014 IPC_MESSAGE_CONTROL1(PpapiPluginMsg_Flash_GetLocalTimeZoneOffsetReply,
2015                      double /* offset */)
2016
2017 // Query the browser for the restrictions on storing Flash LSOs.
2018 IPC_MESSAGE_CONTROL0(PpapiHostMsg_Flash_GetLocalDataRestrictions)
2019 // Reply message for GetLocalDataRestrictions containing the restrictions to
2020 // use. These are PP_FlashLSORestrictions cast to an int32_t.
2021 IPC_MESSAGE_CONTROL1(PpapiPluginMsg_Flash_GetLocalDataRestrictionsReply,
2022                      int32_t /* restrictions */)
2023
2024 // Notifies the renderer whether the Flash instance is in windowed mode. No
2025 // reply is sent.
2026 IPC_MESSAGE_CONTROL1(PpapiHostMsg_Flash_SetInstanceAlwaysOnTop,
2027                      bool /* on_top */)
2028
2029 // Notifies the renderer to draw text to the given PP_ImageData resource. All
2030 // parmeters for drawing (including the resource to draw to) are contianed in
2031 // the PPBFlash_DrawGlyphs_Params structure. An error code is sent in a reply
2032 // message indicating success.
2033 IPC_MESSAGE_CONTROL1(PpapiHostMsg_Flash_DrawGlyphs,
2034                      ppapi::proxy::PPBFlash_DrawGlyphs_Params /* params */)
2035
2036 // Notifies the renderer to navigate to the given URL contained in the
2037 // URLRequestInfoData. An error code is sent in a reply message indicating
2038 // success.
2039 IPC_MESSAGE_CONTROL3(PpapiHostMsg_Flash_Navigate,
2040                      ppapi::URLRequestInfoData /* data */,
2041                      std::string /* target */,
2042                      bool /* from_user_action */)
2043
2044 // Queries the renderer on whether the plugin instance is the topmost element
2045 // in the area of the instance specified by the given PP_Rect. PP_OK is sent as
2046 // the error code in a reply message if the rect is topmost otherwise
2047 // PP_ERROR_FAILED is sent.
2048 IPC_MESSAGE_CONTROL1(PpapiHostMsg_Flash_IsRectTopmost,
2049                      PP_Rect /* rect */)
2050
2051 // Notifies the renderer to invoke printing for the given plugin instance. No
2052 // reply is sent.
2053 IPC_MESSAGE_CONTROL0(PpapiHostMsg_Flash_InvokePrinting)
2054
2055 // DeviceEnumeration -----------------------------------------------------------
2056 // Device enumeration messages used by audio input and video capture.
2057 IPC_MESSAGE_CONTROL0(PpapiHostMsg_DeviceEnumeration_EnumerateDevices)
2058 IPC_MESSAGE_CONTROL1(PpapiPluginMsg_DeviceEnumeration_EnumerateDevicesReply,
2059                      std::vector<ppapi::DeviceRefData> /* devices */)
2060 IPC_MESSAGE_CONTROL1(PpapiHostMsg_DeviceEnumeration_MonitorDeviceChange,
2061                      uint32_t /* callback_id */)
2062 IPC_MESSAGE_CONTROL0(PpapiHostMsg_DeviceEnumeration_StopMonitoringDeviceChange)
2063 IPC_MESSAGE_CONTROL2(PpapiPluginMsg_DeviceEnumeration_NotifyDeviceChange,
2064                      uint32_t /* callback_id */,
2065                      std::vector<ppapi::DeviceRefData> /* devices */)
2066
2067 // Flash clipboard.
2068 IPC_MESSAGE_CONTROL0(PpapiHostMsg_FlashClipboard_Create)
2069 IPC_MESSAGE_CONTROL1(PpapiHostMsg_FlashClipboard_RegisterCustomFormat,
2070                      std::string /* format_name */)
2071 IPC_MESSAGE_CONTROL1(PpapiPluginMsg_FlashClipboard_RegisterCustomFormatReply,
2072                      uint32_t /* format */)
2073 IPC_MESSAGE_CONTROL2(PpapiHostMsg_FlashClipboard_IsFormatAvailable,
2074                      uint32_t /* clipboard_type */,
2075                      uint32_t /* format */)
2076 IPC_MESSAGE_CONTROL2(PpapiHostMsg_FlashClipboard_ReadData,
2077                      uint32_t /* clipboard_type */,
2078                      uint32_t /* format */)
2079 IPC_MESSAGE_CONTROL1(PpapiPluginMsg_FlashClipboard_ReadDataReply,
2080                      std::string /* result */)
2081 IPC_MESSAGE_CONTROL3(PpapiHostMsg_FlashClipboard_WriteData,
2082                      uint32_t /* clipboard_type */,
2083                      std::vector<uint32_t> /* formats */,
2084                      std::vector<std::string> /* data */)
2085 IPC_MESSAGE_CONTROL1(PpapiHostMsg_FlashClipboard_GetSequenceNumber,
2086                      uint32_t /* clipboard_type */)
2087 IPC_MESSAGE_CONTROL1(PpapiPluginMsg_FlashClipboard_GetSequenceNumberReply,
2088                      uint64_t /* sequence_number */)
2089
2090 // Flash DRM.
2091 IPC_MESSAGE_CONTROL0(PpapiHostMsg_FlashDRM_Create)
2092
2093 // Requests the device ID.
2094 IPC_MESSAGE_CONTROL0(PpapiHostMsg_FlashDRM_GetDeviceID)
2095 // Reply for GetDeviceID which includes the device ID as a string.
2096 IPC_MESSAGE_CONTROL1(PpapiPluginMsg_FlashDRM_GetDeviceIDReply,
2097                      std::string /* id */)
2098
2099 // Requests the HMONITOR corresponding to the monitor on which the instance is
2100 // displayed.
2101 IPC_MESSAGE_CONTROL0(PpapiHostMsg_FlashDRM_GetHmonitor)
2102 // Reply message for GetHmonitor which contains the HMONITOR as an int64_t.
2103 IPC_MESSAGE_CONTROL1(PpapiPluginMsg_FlashDRM_GetHmonitorReply,
2104                      int64_t /* hmonitor */)
2105
2106 // Requests the voucher file which is used to verify the integrity of the Flash
2107 // module. A PPB_FileRef resource will be created.
2108 IPC_MESSAGE_CONTROL0(PpapiHostMsg_FlashDRM_GetVoucherFile)
2109 // Reply message for GetVoucherFile which contains the CreateInfo for a
2110 // PPB_FileRef which points to the voucher file.
2111 IPC_MESSAGE_CONTROL1(PpapiPluginMsg_FlashDRM_GetVoucherFileReply,
2112                      ppapi::FileRefCreateInfo /* file_info */)
2113
2114 // Requests a value indicating whether the monitor on which the instance is
2115 // displayed is external.
2116 IPC_MESSAGE_CONTROL0(PpapiHostMsg_FlashDRM_MonitorIsExternal)
2117 // Reply message for MonitorIsExternal which contains the value indicating if
2118 // the monitor is external.
2119 IPC_MESSAGE_CONTROL1(PpapiPluginMsg_FlashDRM_MonitorIsExternalReply,
2120                      PP_Bool /* is_external */)
2121
2122 // Flash file.
2123 IPC_MESSAGE_CONTROL0(PpapiHostMsg_FlashFile_Create)
2124 IPC_MESSAGE_CONTROL2(PpapiHostMsg_FlashFile_OpenFile,
2125                      ppapi::PepperFilePath /* path */,
2126                      int /* pp_open_flags */)
2127 IPC_MESSAGE_CONTROL2(PpapiHostMsg_FlashFile_RenameFile,
2128                      ppapi::PepperFilePath /* from_path */,
2129                      ppapi::PepperFilePath /* to_path */)
2130 IPC_MESSAGE_CONTROL2(PpapiHostMsg_FlashFile_DeleteFileOrDir,
2131                      ppapi::PepperFilePath /* path */,
2132                      bool /* recursive */)
2133 IPC_MESSAGE_CONTROL1(PpapiHostMsg_FlashFile_CreateDir,
2134                      ppapi::PepperFilePath /* path */)
2135 IPC_MESSAGE_CONTROL1(PpapiHostMsg_FlashFile_QueryFile,
2136                      ppapi::PepperFilePath /* path */)
2137 IPC_MESSAGE_CONTROL1(PpapiPluginMsg_FlashFile_QueryFileReply,
2138                      base::File::Info /* file_info */)
2139 IPC_MESSAGE_CONTROL1(PpapiHostMsg_FlashFile_GetDirContents,
2140                      ppapi::PepperFilePath /* path */)
2141 IPC_MESSAGE_CONTROL1(PpapiPluginMsg_FlashFile_GetDirContentsReply,
2142                      ppapi::DirContents /* entries */)
2143 IPC_MESSAGE_CONTROL0(PpapiHostMsg_FlashFile_CreateTemporaryFile)
2144
2145 // Flash font file.
2146 IPC_MESSAGE_CONTROL2(PpapiHostMsg_FlashFontFile_Create,
2147                      ppapi::proxy::SerializedFontDescription /* description */,
2148                      PP_PrivateFontCharset /* charset */)
2149 IPC_MESSAGE_CONTROL1(PpapiHostMsg_FlashFontFile_GetFontTable,
2150                      uint32_t /* table */)
2151 IPC_MESSAGE_CONTROL1(PpapiPluginMsg_FlashFontFile_GetFontTableReply,
2152                      std::string /* output */)
2153
2154 // Flash fullscreen.
2155 IPC_MESSAGE_CONTROL0(PpapiHostMsg_FlashFullscreen_Create)
2156 IPC_MESSAGE_CONTROL1(PpapiHostMsg_FlashFullscreen_SetFullscreen,
2157                      bool /* fullscreen */)
2158
2159 // FlashMenu.
2160
2161 // Creates the flash menu with the given data.
2162 IPC_MESSAGE_CONTROL1(PpapiHostMsg_FlashMenu_Create,
2163                      ppapi::proxy::SerializedFlashMenu /* menu_data */)
2164
2165 // Shows the menu at the given location relative to the plugin instance.
2166 IPC_MESSAGE_CONTROL1(PpapiHostMsg_FlashMenu_Show,
2167                      PP_Point /* location */)
2168
2169 // Reply to a show command. If the resource reply is PP_OK, the selected_id
2170 // will be the menu item ID chosen by the user.
2171 IPC_MESSAGE_CONTROL1(PpapiPluginMsg_FlashMenu_ShowReply,
2172                      int32_t /* selected_id */)
2173
2174 // PPB_Flash_MessageLoop.
2175 IPC_SYNC_MESSAGE_ROUTED1_1(PpapiHostMsg_PPBFlashMessageLoop_Create,
2176                            PP_Instance /* instance */,
2177                            ppapi::HostResource /* result */)
2178 IPC_SYNC_MESSAGE_ROUTED1_1(PpapiHostMsg_PPBFlashMessageLoop_Run,
2179                            ppapi::HostResource /* flash_message_loop */,
2180                            int32_t /* result */)
2181 IPC_SYNC_MESSAGE_ROUTED1_0(PpapiHostMsg_PPBFlashMessageLoop_Quit,
2182                            ppapi::HostResource /* flash_message_loop */)
2183
2184 // PDF ------------------------------------------------------------------------
2185
2186 // Creates the PDF resource.
2187 IPC_MESSAGE_CONTROL0(PpapiHostMsg_PDF_Create)
2188
2189 // Requests the localized string for the given ID.
2190 IPC_MESSAGE_CONTROL1(PpapiHostMsg_PDF_GetLocalizedString,
2191                      PP_ResourceString /* string_id */)
2192 // Reply for PpapiHostMsg_PDF_GetLocalizedString containing the localized
2193 // string.
2194 IPC_MESSAGE_CONTROL1(PpapiPluginMsg_PDF_GetLocalizedStringReply,
2195                      std::string /* localized_string*/)
2196
2197 // Notifies the renderer that the PDF started loading.
2198 IPC_MESSAGE_CONTROL0(PpapiHostMsg_PDF_DidStartLoading)
2199
2200 // Notifies the renderer that the PDF stopped loading.
2201 IPC_MESSAGE_CONTROL0(PpapiHostMsg_PDF_DidStopLoading)
2202
2203 // Sets any restrictions on the PDF content.
2204 IPC_MESSAGE_CONTROL1(PpapiHostMsg_PDF_SetContentRestriction,
2205                      int /* restrictions */)
2206
2207 // Requests that the specified action be recorded with UMA.
2208 IPC_MESSAGE_CONTROL1(PpapiHostMsg_PDF_UserMetricsRecordAction,
2209                      std::string /* action */)
2210
2211 // Notifies the renderer that the current PDF uses an unsupported feature.
2212 IPC_MESSAGE_CONTROL0(PpapiHostMsg_PDF_HasUnsupportedFeature)
2213
2214 // Notifies the renderer to print the current PDF.
2215 IPC_MESSAGE_CONTROL0(PpapiHostMsg_PDF_Print)
2216
2217 // Notifies the renderer to save the current PDF.
2218 IPC_MESSAGE_CONTROL0(PpapiHostMsg_PDF_SaveAs)
2219
2220 // Requests a resource image for the plugin at a particular scale.
2221 IPC_MESSAGE_CONTROL2(PpapiHostMsg_PDF_GetResourceImage,
2222                      PP_ResourceImage /* image_id */,
2223                      float /* scale */)
2224
2225 // Reply for PpapiHostMsg_PDF_GetResourceImage containing the host resource id
2226 // of the image and a PP_ImageDataDesc which describes the image. Also carries
2227 // a shared memory handle pointing to the memory containg the image.
2228 IPC_MESSAGE_CONTROL2(PpapiPluginMsg_PDF_GetResourceImageReply,
2229                      ppapi::HostResource /* resource_id */,
2230                      PP_ImageDataDesc /* image_data_desc */)
2231
2232 // Called by the plugin when its selection changes.
2233 IPC_MESSAGE_CONTROL1(PpapiHostMsg_PDF_SetSelectedText,
2234                      base::string16 /* selected_text */)
2235
2236 // Called by the plugin to set the link under the cursor.
2237 IPC_MESSAGE_CONTROL1(PpapiHostMsg_PDF_SetLinkUnderCursor,
2238                      std::string /* url */)
2239
2240 // VideoCapture_Dev, plugin -> host
2241 IPC_MESSAGE_CONTROL0(PpapiHostMsg_VideoCapture_Create)
2242 IPC_MESSAGE_CONTROL0(PpapiHostMsg_VideoCapture_StartCapture)
2243 IPC_MESSAGE_CONTROL1(PpapiHostMsg_VideoCapture_ReuseBuffer,
2244                      uint32_t /* buffer */)
2245 IPC_MESSAGE_CONTROL0(PpapiHostMsg_VideoCapture_StopCapture)
2246 IPC_MESSAGE_CONTROL0(PpapiHostMsg_VideoCapture_Close)
2247
2248 // VideoCapture_Dev, plugin -> host -> plugin
2249 IPC_MESSAGE_CONTROL3(PpapiHostMsg_VideoCapture_Open,
2250                      std::string /* device_id */,
2251                      PP_VideoCaptureDeviceInfo_Dev /* requested_info */,
2252                      uint32_t /* buffer_count */)
2253 IPC_MESSAGE_CONTROL0(PpapiPluginMsg_VideoCapture_OpenReply)
2254
2255 // VideoCapture_Dev, host -> plugin
2256 IPC_MESSAGE_CONTROL3(PpapiPluginMsg_VideoCapture_OnDeviceInfo,
2257                      PP_VideoCaptureDeviceInfo_Dev /* info */,
2258                      std::vector<ppapi::HostResource> /* buffers */,
2259                      uint32_t /* buffer_size */)
2260 IPC_MESSAGE_CONTROL1(PpapiPluginMsg_VideoCapture_OnStatus,
2261                      uint32_t /* status */)
2262 IPC_MESSAGE_CONTROL1(PpapiPluginMsg_VideoCapture_OnError,
2263                      uint32_t /* error */)
2264 IPC_MESSAGE_CONTROL1(PpapiPluginMsg_VideoCapture_OnBufferReady,
2265                      uint32_t /* buffer */)
2266
2267 // Talk ------------------------------------------------------------------------
2268
2269 IPC_MESSAGE_CONTROL0(PpapiHostMsg_Talk_Create)
2270 IPC_MESSAGE_CONTROL1(PpapiHostMsg_Talk_RequestPermission,
2271                      PP_TalkPermission /* permission */)
2272 IPC_MESSAGE_CONTROL0(PpapiPluginMsg_Talk_RequestPermissionReply)
2273 IPC_MESSAGE_CONTROL0(PpapiHostMsg_Talk_StartRemoting)
2274 IPC_MESSAGE_CONTROL0(PpapiPluginMsg_Talk_StartRemotingReply)
2275 IPC_MESSAGE_CONTROL0(PpapiHostMsg_Talk_StopRemoting)
2276 IPC_MESSAGE_CONTROL0(PpapiPluginMsg_Talk_StopRemotingReply)
2277 IPC_MESSAGE_CONTROL1(PpapiPluginMsg_Talk_NotifyEvent, PP_TalkEvent /* event */)
2278
2279 #endif  // !defined(OS_NACL) && !defined(NACL_WIN64)