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