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