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