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