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/process.h"
12 #include "base/shared_memory.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_text_input_dev.h"
25 #include "ppapi/c/dev/ppb_truetype_font_dev.h"
26 #include "ppapi/c/dev/ppb_url_util_dev.h"
27 #include "ppapi/c/dev/ppp_printing_dev.h"
28 #include "ppapi/c/pp_bool.h"
29 #include "ppapi/c/pp_file_info.h"
30 #include "ppapi/c/pp_instance.h"
31 #include "ppapi/c/pp_module.h"
32 #include "ppapi/c/pp_point.h"
33 #include "ppapi/c/pp_rect.h"
34 #include "ppapi/c/pp_resource.h"
35 #include "ppapi/c/pp_size.h"
36 #include "ppapi/c/pp_time.h"
37 #include "ppapi/c/ppb_audio_config.h"
38 #include "ppapi/c/ppb_image_data.h"
39 #include "ppapi/c/ppb_tcp_socket.h"
40 #include "ppapi/c/ppb_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/ppp_flash_browser_operations.h"
48 #include "ppapi/c/private/ppb_talk_private.h"
49 #include "ppapi/proxy/host_resolver_private_resource.h"
50 #include "ppapi/proxy/ppapi_param_traits.h"
51 #include "ppapi/proxy/ppapi_proxy_export.h"
52 #include "ppapi/proxy/resource_message_params.h"
53 #include "ppapi/proxy/serialized_flash_menu.h"
54 #include "ppapi/proxy/serialized_handle.h"
55 #include "ppapi/proxy/serialized_structs.h"
56 #include "ppapi/proxy/serialized_var.h"
57 #include "ppapi/shared_impl/dir_contents.h"
58 #include "ppapi/shared_impl/file_path.h"
59 #include "ppapi/shared_impl/ppapi_nacl_channel_args.h"
60 #include "ppapi/shared_impl/ppapi_preferences.h"
61 #include "ppapi/shared_impl/ppb_device_ref_shared.h"
62 #include "ppapi/shared_impl/ppb_input_event_shared.h"
63 #include "ppapi/shared_impl/ppb_network_list_private_shared.h"
64 #include "ppapi/shared_impl/ppb_view_shared.h"
65 #include "ppapi/shared_impl/ppp_flash_browser_operations_shared.h"
66 #include "ppapi/shared_impl/private/ppb_x509_certificate_private_shared.h"
67 #include "ppapi/shared_impl/socket_option_data.h"
68 #include "ppapi/shared_impl/url_request_info_data.h"
69 #include "ppapi/shared_impl/url_response_info_data.h"
71 #undef IPC_MESSAGE_EXPORT
72 #define IPC_MESSAGE_EXPORT PPAPI_PROXY_EXPORT
74 #define IPC_MESSAGE_START PpapiMsgStart
76 IPC_ENUM_TRAITS(PP_AudioSampleRate
)
77 IPC_ENUM_TRAITS(PP_DeviceType_Dev
)
78 IPC_ENUM_TRAITS(PP_DecryptorStreamType
)
79 IPC_ENUM_TRAITS(PP_FileSystemType
)
80 IPC_ENUM_TRAITS(PP_FileType
)
81 IPC_ENUM_TRAITS(PP_Flash_BrowserOperations_Permission
)
82 IPC_ENUM_TRAITS(PP_Flash_BrowserOperations_SettingType
)
83 IPC_ENUM_TRAITS(PP_FlashSetting
)
84 IPC_ENUM_TRAITS(PP_ImageDataFormat
)
85 IPC_ENUM_TRAITS(PP_InputEvent_MouseButton
)
86 IPC_ENUM_TRAITS(PP_InputEvent_Type
)
87 IPC_ENUM_TRAITS_MAX_VALUE(PP_NetAddressFamily_Private
, PP_NETADDRESSFAMILY_IPV6
)
88 IPC_ENUM_TRAITS(PP_NetworkListState_Private
)
89 IPC_ENUM_TRAITS(PP_NetworkListType_Private
)
90 IPC_ENUM_TRAITS(PP_PrintOrientation_Dev
)
91 IPC_ENUM_TRAITS(PP_PrintOutputFormat_Dev
)
92 IPC_ENUM_TRAITS(PP_PrintScalingOption_Dev
)
93 IPC_ENUM_TRAITS(PP_PrivateFontCharset
)
94 IPC_ENUM_TRAITS(PP_ResourceImage
)
95 IPC_ENUM_TRAITS(PP_ResourceString
)
96 IPC_ENUM_TRAITS_MAX_VALUE(PP_TalkEvent
, PP_TALKEVENT_NUM_EVENTS
- 1)
97 IPC_ENUM_TRAITS_MAX_VALUE(PP_TalkPermission
,
98 PP_TALKPERMISSION_NUM_PERMISSIONS
- 1)
99 IPC_ENUM_TRAITS_MAX_VALUE(PP_TCPSocket_Option
,
100 PP_TCPSOCKET_OPTION_RECV_BUFFER_SIZE
)
101 IPC_ENUM_TRAITS(PP_TextInput_Type
)
102 IPC_ENUM_TRAITS(PP_TrueTypeFontFamily_Dev
)
103 IPC_ENUM_TRAITS(PP_TrueTypeFontStyle_Dev
)
104 IPC_ENUM_TRAITS(PP_TrueTypeFontWeight_Dev
)
105 IPC_ENUM_TRAITS(PP_TrueTypeFontWidth_Dev
)
106 IPC_ENUM_TRAITS(PP_TrueTypeFontCharset_Dev
)
107 IPC_ENUM_TRAITS_MAX_VALUE(PP_UDPSocket_Option
,
108 PP_UDPSOCKET_OPTION_RECV_BUFFER_SIZE
)
109 IPC_ENUM_TRAITS(PP_VideoDecodeError_Dev
)
110 IPC_ENUM_TRAITS(PP_VideoDecoder_Profile
)
112 IPC_STRUCT_TRAITS_BEGIN(PP_Point
)
113 IPC_STRUCT_TRAITS_MEMBER(x
)
114 IPC_STRUCT_TRAITS_MEMBER(y
)
115 IPC_STRUCT_TRAITS_END()
117 IPC_STRUCT_TRAITS_BEGIN(PP_FloatPoint
)
118 IPC_STRUCT_TRAITS_MEMBER(x
)
119 IPC_STRUCT_TRAITS_MEMBER(y
)
120 IPC_STRUCT_TRAITS_END()
122 IPC_STRUCT_TRAITS_BEGIN(PP_Size
)
123 IPC_STRUCT_TRAITS_MEMBER(height
)
124 IPC_STRUCT_TRAITS_MEMBER(width
)
125 IPC_STRUCT_TRAITS_END()
127 IPC_STRUCT_TRAITS_BEGIN(PP_Rect
)
128 IPC_STRUCT_TRAITS_MEMBER(point
)
129 IPC_STRUCT_TRAITS_MEMBER(size
)
130 IPC_STRUCT_TRAITS_END()
132 IPC_STRUCT_TRAITS_BEGIN(PP_ImageDataDesc
)
133 IPC_STRUCT_TRAITS_MEMBER(format
)
134 IPC_STRUCT_TRAITS_MEMBER(size
)
135 IPC_STRUCT_TRAITS_MEMBER(stride
)
136 IPC_STRUCT_TRAITS_END()
138 IPC_STRUCT_TRAITS_BEGIN(PP_PictureBuffer_Dev
)
139 IPC_STRUCT_TRAITS_MEMBER(id
)
140 IPC_STRUCT_TRAITS_MEMBER(size
)
141 IPC_STRUCT_TRAITS_MEMBER(texture_id
)
142 IPC_STRUCT_TRAITS_END()
144 IPC_STRUCT_TRAITS_BEGIN(PP_Picture_Dev
)
145 IPC_STRUCT_TRAITS_MEMBER(picture_buffer_id
)
146 IPC_STRUCT_TRAITS_MEMBER(bitstream_buffer_id
)
147 IPC_STRUCT_TRAITS_END()
149 IPC_STRUCT_TRAITS_BEGIN(PP_PrintPageNumberRange_Dev
)
150 IPC_STRUCT_TRAITS_MEMBER(first_page_number
)
151 IPC_STRUCT_TRAITS_MEMBER(last_page_number
)
152 IPC_STRUCT_TRAITS_END()
154 IPC_STRUCT_TRAITS_BEGIN(PP_VideoCaptureDeviceInfo_Dev
)
155 IPC_STRUCT_TRAITS_MEMBER(width
)
156 IPC_STRUCT_TRAITS_MEMBER(height
)
157 IPC_STRUCT_TRAITS_MEMBER(frames_per_second
)
158 IPC_STRUCT_TRAITS_END()
160 IPC_STRUCT_TRAITS_BEGIN(PP_HostResolver_Private_Hint
)
161 IPC_STRUCT_TRAITS_MEMBER(family
)
162 IPC_STRUCT_TRAITS_MEMBER(flags
)
163 IPC_STRUCT_TRAITS_END()
165 IPC_STRUCT_TRAITS_BEGIN(PP_PrintSettings_Dev
)
166 IPC_STRUCT_TRAITS_MEMBER(printable_area
)
167 IPC_STRUCT_TRAITS_MEMBER(content_area
)
168 IPC_STRUCT_TRAITS_MEMBER(paper_size
)
169 IPC_STRUCT_TRAITS_MEMBER(dpi
)
170 IPC_STRUCT_TRAITS_MEMBER(orientation
)
171 IPC_STRUCT_TRAITS_MEMBER(print_scaling_option
)
172 IPC_STRUCT_TRAITS_MEMBER(grayscale
)
173 IPC_STRUCT_TRAITS_MEMBER(format
)
174 IPC_STRUCT_TRAITS_END()
176 IPC_STRUCT_TRAITS_BEGIN(PP_URLComponent_Dev
)
177 IPC_STRUCT_TRAITS_MEMBER(begin
)
178 IPC_STRUCT_TRAITS_MEMBER(len
)
179 IPC_STRUCT_TRAITS_END()
181 IPC_STRUCT_TRAITS_BEGIN(PP_URLComponents_Dev
)
182 IPC_STRUCT_TRAITS_MEMBER(scheme
)
183 IPC_STRUCT_TRAITS_MEMBER(username
)
184 IPC_STRUCT_TRAITS_MEMBER(password
)
185 IPC_STRUCT_TRAITS_MEMBER(host
)
186 IPC_STRUCT_TRAITS_MEMBER(port
)
187 IPC_STRUCT_TRAITS_MEMBER(path
)
188 IPC_STRUCT_TRAITS_MEMBER(query
)
189 IPC_STRUCT_TRAITS_MEMBER(ref
)
190 IPC_STRUCT_TRAITS_END()
192 IPC_STRUCT_TRAITS_BEGIN(ppapi::DeviceRefData
)
193 IPC_STRUCT_TRAITS_MEMBER(type
)
194 IPC_STRUCT_TRAITS_MEMBER(name
)
195 IPC_STRUCT_TRAITS_MEMBER(id
)
196 IPC_STRUCT_TRAITS_END()
198 IPC_STRUCT_TRAITS_BEGIN(ppapi::DirEntry
)
199 IPC_STRUCT_TRAITS_MEMBER(name
)
200 IPC_STRUCT_TRAITS_MEMBER(is_dir
)
201 IPC_STRUCT_TRAITS_END()
203 IPC_STRUCT_TRAITS_BEGIN(ppapi::FileRef_CreateInfo
)
204 IPC_STRUCT_TRAITS_MEMBER(file_system_type
)
205 IPC_STRUCT_TRAITS_MEMBER(internal_path
)
206 IPC_STRUCT_TRAITS_MEMBER(external_path
)
207 IPC_STRUCT_TRAITS_MEMBER(display_name
)
208 IPC_STRUCT_TRAITS_MEMBER(pending_host_resource_id
)
209 IPC_STRUCT_TRAITS_MEMBER(file_system_plugin_resource
)
210 IPC_STRUCT_TRAITS_END()
212 IPC_STRUCT_TRAITS_BEGIN(ppapi::FlashSiteSetting
)
213 IPC_STRUCT_TRAITS_MEMBER(site
)
214 IPC_STRUCT_TRAITS_MEMBER(permission
)
215 IPC_STRUCT_TRAITS_END()
217 IPC_STRUCT_TRAITS_BEGIN(ppapi::ViewData
)
218 IPC_STRUCT_TRAITS_MEMBER(rect
)
219 IPC_STRUCT_TRAITS_MEMBER(is_fullscreen
)
220 IPC_STRUCT_TRAITS_MEMBER(is_page_visible
)
221 IPC_STRUCT_TRAITS_MEMBER(clip_rect
)
222 IPC_STRUCT_TRAITS_MEMBER(device_scale
)
223 IPC_STRUCT_TRAITS_MEMBER(css_scale
)
224 IPC_STRUCT_TRAITS_END()
226 IPC_STRUCT_TRAITS_BEGIN(PP_TouchPoint
)
227 IPC_STRUCT_TRAITS_MEMBER(id
)
228 IPC_STRUCT_TRAITS_MEMBER(position
)
229 IPC_STRUCT_TRAITS_MEMBER(radius
)
230 IPC_STRUCT_TRAITS_MEMBER(rotation_angle
)
231 IPC_STRUCT_TRAITS_MEMBER(pressure
)
232 IPC_STRUCT_TRAITS_END()
234 IPC_STRUCT_TRAITS_BEGIN(ppapi::Preferences
)
235 IPC_STRUCT_TRAITS_MEMBER(standard_font_family_map
)
236 IPC_STRUCT_TRAITS_MEMBER(fixed_font_family_map
)
237 IPC_STRUCT_TRAITS_MEMBER(serif_font_family_map
)
238 IPC_STRUCT_TRAITS_MEMBER(sans_serif_font_family_map
)
239 IPC_STRUCT_TRAITS_MEMBER(default_font_size
)
240 IPC_STRUCT_TRAITS_MEMBER(default_fixed_font_size
)
241 IPC_STRUCT_TRAITS_MEMBER(number_of_cpu_cores
)
242 IPC_STRUCT_TRAITS_MEMBER(is_3d_supported
)
243 IPC_STRUCT_TRAITS_MEMBER(is_stage3d_supported
)
244 IPC_STRUCT_TRAITS_MEMBER(is_stage3d_baseline_supported
)
245 IPC_STRUCT_TRAITS_END()
247 IPC_STRUCT_TRAITS_BEGIN(ppapi::InputEventData
)
248 IPC_STRUCT_TRAITS_MEMBER(is_filtered
)
249 IPC_STRUCT_TRAITS_MEMBER(event_type
)
250 IPC_STRUCT_TRAITS_MEMBER(event_time_stamp
)
251 IPC_STRUCT_TRAITS_MEMBER(event_modifiers
)
252 IPC_STRUCT_TRAITS_MEMBER(mouse_button
)
253 IPC_STRUCT_TRAITS_MEMBER(mouse_position
)
254 IPC_STRUCT_TRAITS_MEMBER(mouse_click_count
)
255 IPC_STRUCT_TRAITS_MEMBER(mouse_movement
)
256 IPC_STRUCT_TRAITS_MEMBER(wheel_delta
)
257 IPC_STRUCT_TRAITS_MEMBER(wheel_ticks
)
258 IPC_STRUCT_TRAITS_MEMBER(wheel_scroll_by_page
)
259 IPC_STRUCT_TRAITS_MEMBER(key_code
)
260 IPC_STRUCT_TRAITS_MEMBER(usb_key_code
)
261 IPC_STRUCT_TRAITS_MEMBER(character_text
)
262 IPC_STRUCT_TRAITS_MEMBER(composition_segment_offsets
)
263 IPC_STRUCT_TRAITS_MEMBER(composition_target_segment
)
264 IPC_STRUCT_TRAITS_MEMBER(composition_selection_start
)
265 IPC_STRUCT_TRAITS_MEMBER(composition_selection_end
)
266 IPC_STRUCT_TRAITS_MEMBER(touches
)
267 IPC_STRUCT_TRAITS_MEMBER(changed_touches
)
268 IPC_STRUCT_TRAITS_MEMBER(target_touches
)
269 IPC_STRUCT_TRAITS_END()
271 IPC_STRUCT_TRAITS_BEGIN(ppapi::HostPortPair
)
272 IPC_STRUCT_TRAITS_MEMBER(host
)
273 IPC_STRUCT_TRAITS_MEMBER(port
)
274 IPC_STRUCT_TRAITS_END()
276 IPC_STRUCT_TRAITS_BEGIN(ppapi::URLRequestInfoData
)
277 IPC_STRUCT_TRAITS_MEMBER(url
)
278 IPC_STRUCT_TRAITS_MEMBER(method
)
279 IPC_STRUCT_TRAITS_MEMBER(headers
)
280 IPC_STRUCT_TRAITS_MEMBER(stream_to_file
)
281 IPC_STRUCT_TRAITS_MEMBER(follow_redirects
)
282 IPC_STRUCT_TRAITS_MEMBER(record_download_progress
)
283 IPC_STRUCT_TRAITS_MEMBER(record_upload_progress
)
284 IPC_STRUCT_TRAITS_MEMBER(has_custom_referrer_url
)
285 IPC_STRUCT_TRAITS_MEMBER(custom_referrer_url
)
286 IPC_STRUCT_TRAITS_MEMBER(allow_cross_origin_requests
)
287 IPC_STRUCT_TRAITS_MEMBER(allow_credentials
)
288 IPC_STRUCT_TRAITS_MEMBER(has_custom_content_transfer_encoding
)
289 IPC_STRUCT_TRAITS_MEMBER(custom_content_transfer_encoding
)
290 IPC_STRUCT_TRAITS_MEMBER(prefetch_buffer_upper_threshold
)
291 IPC_STRUCT_TRAITS_MEMBER(prefetch_buffer_lower_threshold
)
292 IPC_STRUCT_TRAITS_MEMBER(has_custom_user_agent
)
293 IPC_STRUCT_TRAITS_MEMBER(custom_user_agent
)
294 IPC_STRUCT_TRAITS_MEMBER(body
)
295 IPC_STRUCT_TRAITS_END()
297 IPC_STRUCT_TRAITS_BEGIN(ppapi::URLRequestInfoData::BodyItem
)
298 IPC_STRUCT_TRAITS_MEMBER(is_file
)
299 IPC_STRUCT_TRAITS_MEMBER(data
)
300 // Note: we don't serialize file_ref.
301 IPC_STRUCT_TRAITS_MEMBER(file_ref_host_resource
)
302 IPC_STRUCT_TRAITS_MEMBER(start_offset
)
303 IPC_STRUCT_TRAITS_MEMBER(number_of_bytes
)
304 IPC_STRUCT_TRAITS_MEMBER(expected_last_modified_time
)
305 IPC_STRUCT_TRAITS_END()
307 IPC_STRUCT_TRAITS_BEGIN(ppapi::URLResponseInfoData
)
308 IPC_STRUCT_TRAITS_MEMBER(url
)
309 IPC_STRUCT_TRAITS_MEMBER(headers
)
310 IPC_STRUCT_TRAITS_MEMBER(status_code
)
311 IPC_STRUCT_TRAITS_MEMBER(status_text
)
312 IPC_STRUCT_TRAITS_MEMBER(redirect_url
)
313 IPC_STRUCT_TRAITS_MEMBER(body_as_file_ref
)
314 IPC_STRUCT_TRAITS_END()
316 IPC_STRUCT_TRAITS_BEGIN(ppapi::NetworkInfo
)
317 IPC_STRUCT_TRAITS_MEMBER(name
)
318 IPC_STRUCT_TRAITS_MEMBER(type
)
319 IPC_STRUCT_TRAITS_MEMBER(state
)
320 IPC_STRUCT_TRAITS_MEMBER(addresses
)
321 IPC_STRUCT_TRAITS_MEMBER(display_name
)
322 IPC_STRUCT_TRAITS_MEMBER(mtu
)
323 IPC_STRUCT_TRAITS_END()
325 // Only whitelisted switches passed through NaClChannelArgs.
326 // The list of switches can be found in:
327 // chrome/browser/nacl_host/nacl_process_host.cc
328 IPC_STRUCT_TRAITS_BEGIN(ppapi::PpapiNaClChannelArgs
)
329 IPC_STRUCT_TRAITS_MEMBER(off_the_record
)
330 IPC_STRUCT_TRAITS_MEMBER(permissions
)
331 IPC_STRUCT_TRAITS_MEMBER(switch_names
)
332 IPC_STRUCT_TRAITS_MEMBER(switch_values
)
333 IPC_STRUCT_TRAITS_END()
335 #if !defined(OS_NACL) && !defined(NACL_WIN64)
337 IPC_STRUCT_TRAITS_BEGIN(ppapi::proxy::PPPDecryptor_Buffer
)
338 IPC_STRUCT_TRAITS_MEMBER(resource
)
339 IPC_STRUCT_TRAITS_MEMBER(handle
)
340 IPC_STRUCT_TRAITS_MEMBER(size
)
341 IPC_STRUCT_TRAITS_END()
343 #endif // !defined(OS_NACL) && !defined(NACL_WIN64)
345 // These are from the browser to the plugin.
346 // Loads the given plugin.
347 IPC_MESSAGE_CONTROL2(PpapiMsg_LoadPlugin
,
348 base::FilePath
/* path */,
349 ppapi::PpapiPermissions
/* permissions */)
351 // Creates a channel to talk to a renderer. The plugin will respond with
352 // PpapiHostMsg_ChannelCreated.
353 IPC_MESSAGE_CONTROL3(PpapiMsg_CreateChannel
,
354 base::ProcessId
/* renderer_pid */,
355 int /* renderer_child_id */,
356 bool /* incognito */)
358 // Creates a channel to talk to a renderer. This message is only used by the
359 // NaCl IPC proxy. It is intercepted by NaClIPCAdapter, which creates the
360 // actual channel and rewrites the message for the untrusted side.
361 IPC_MESSAGE_CONTROL3(PpapiMsg_CreateNaClChannel
,
362 int /* renderer_id */,
363 ppapi::PpapiNaClChannelArgs
/* args */,
364 ppapi::proxy::SerializedHandle
/* channel_handle */)
366 // Instructs the plugin process to crash.
367 IPC_MESSAGE_CONTROL0(PpapiMsg_Crash
)
369 // Instructs the plugin process to hang.
370 IPC_MESSAGE_CONTROL0(PpapiMsg_Hang
)
372 // Each plugin may be referenced by multiple renderers. We need the instance
373 // IDs to be unique within a plugin, despite coming from different renderers,
374 // and unique within a renderer, despite going to different plugins. This means
375 // that neither the renderer nor the plugin can generate instance IDs without
376 // consulting the other.
378 // We resolve this by having the renderer generate a unique instance ID inside
379 // its process. It then asks the plugin to reserve that ID by sending this sync
380 // message. If the plugin has not yet seen this ID, it will remember it as used
381 // (to prevent a race condition if another renderer tries to then use the same
382 // instance), and set usable as true.
384 // If the plugin has already seen the instance ID, it will set usable as false
385 // and the renderer must retry a new instance ID.
386 IPC_SYNC_MESSAGE_CONTROL1_1(PpapiMsg_ReserveInstanceId
,
387 PP_Instance
/* instance */,
390 // Passes the WebKit preferences to the plugin.
391 IPC_MESSAGE_CONTROL1(PpapiMsg_SetPreferences
,
394 // Sent in both directions to see if the other side supports the given
396 IPC_SYNC_MESSAGE_CONTROL1_1(PpapiMsg_SupportsInterface
,
397 std::string
/* interface_name */,
400 #if !defined(OS_NACL) && !defined(NACL_WIN64)
401 // Network state notification from the browser for implementing
402 // PPP_NetworkState_Dev.
403 IPC_MESSAGE_CONTROL1(PpapiMsg_SetNetworkState
,
406 // Requests a list of sites that have data stored from the plugin. The plugin
407 // process will respond with PpapiHostMsg_GetSitesWithDataResult. This is used
409 IPC_MESSAGE_CONTROL2(PpapiMsg_GetSitesWithData
,
410 uint32
/* request_id */,
411 base::FilePath
/* plugin_data_path */)
412 IPC_MESSAGE_CONTROL2(PpapiHostMsg_GetSitesWithDataResult
,
413 uint32
/* request_id */,
414 std::vector
<std::string
> /* sites */)
416 // Instructs the plugin to clear data for the given site & time. The plugin
417 // process will respond with PpapiHostMsg_ClearSiteDataResult. This is used
419 IPC_MESSAGE_CONTROL5(PpapiMsg_ClearSiteData
,
420 uint32
/* request_id */,
421 base::FilePath
/* plugin_data_path */,
422 std::string
/* site */,
424 uint64
/* max_age */)
425 IPC_MESSAGE_CONTROL2(PpapiHostMsg_ClearSiteDataResult
,
426 uint32
/* request_id */,
429 IPC_MESSAGE_CONTROL2(PpapiMsg_DeauthorizeContentLicenses
,
430 uint32
/* request_id */,
431 base::FilePath
/* plugin_data_path */)
432 IPC_MESSAGE_CONTROL2(PpapiHostMsg_DeauthorizeContentLicensesResult
,
433 uint32
/* request_id */,
436 IPC_MESSAGE_CONTROL3(PpapiMsg_GetPermissionSettings
,
437 uint32
/* request_id */,
438 base::FilePath
/* plugin_data_path */,
439 PP_Flash_BrowserOperations_SettingType
/* setting_type */)
440 IPC_MESSAGE_CONTROL4(
441 PpapiHostMsg_GetPermissionSettingsResult
,
442 uint32
/* request_id */,
444 PP_Flash_BrowserOperations_Permission
/* default_permission */,
445 ppapi::FlashSiteSettings
/* sites */)
447 IPC_MESSAGE_CONTROL5(PpapiMsg_SetDefaultPermission
,
448 uint32
/* request_id */,
449 base::FilePath
/* plugin_data_path */,
450 PP_Flash_BrowserOperations_SettingType
/* setting_type */,
451 PP_Flash_BrowserOperations_Permission
/* permission */,
452 bool /* clear_site_specific */)
453 IPC_MESSAGE_CONTROL2(PpapiHostMsg_SetDefaultPermissionResult
,
454 uint32
/* request_id */,
457 IPC_MESSAGE_CONTROL4(PpapiMsg_SetSitePermission
,
458 uint32
/* request_id */,
459 base::FilePath
/* plugin_data_path */,
460 PP_Flash_BrowserOperations_SettingType
/* setting_type */,
461 ppapi::FlashSiteSettings
/* sites */)
462 IPC_MESSAGE_CONTROL2(PpapiHostMsg_SetSitePermissionResult
,
463 uint32
/* request_id */,
467 IPC_SYNC_MESSAGE_CONTROL2_1(PpapiMsg_ConnectToPlugin
,
468 PP_Instance
/* instance */,
469 IPC::PlatformFileForTransit
/* handle */,
470 int32_t /* result */)
471 #endif // !defined(OS_NACL) && !defined(NACL_WIN64)
475 // Notifies the result of the audio stream create call. This is called in
476 // both error cases and in the normal success case. These cases are
477 // differentiated by the result code, which is one of the standard PPAPI
480 // The handler of this message should always close all of the handles passed
481 // in, since some could be valid even in the error case.
482 IPC_MESSAGE_ROUTED4(PpapiMsg_PPBAudio_NotifyAudioStreamCreated
,
483 ppapi::HostResource
/* audio_id */,
484 int32_t /* result_code (will be != PP_OK on failure) */,
485 ppapi::proxy::SerializedHandle
/* socket_handle */,
486 ppapi::proxy::SerializedHandle
/* handle */)
489 // TODO(teravest): Remove these messages when we've switched over to the "new"
492 PpapiMsg_PPBFileRef_CallbackComplete
,
493 ppapi::HostResource
/* resource */,
494 uint32_t /* callback_id */,
495 int32_t /* result */)
498 PpapiMsg_PPBFileRef_QueryCallbackComplete
,
499 ppapi::HostResource
/* resource */,
500 PP_FileInfo
/* file_info */,
501 uint32_t /* callback_id */,
502 int32_t /* result */)
505 PpapiMsg_PPBFileRef_ReadDirectoryEntriesCallbackComplete
,
506 ppapi::HostResource
/* resource */,
507 std::vector
<ppapi::PPB_FileRef_CreateInfo
> /* files */,
508 std::vector
<PP_FileType
> /* file_types */,
509 uint32_t /* callback_id */,
510 int32_t /* result */)
514 PpapiMsg_PPBFileSystem_OpenComplete
,
515 ppapi::HostResource
/* filesystem */,
516 int32_t /* result */)
519 IPC_MESSAGE_ROUTED2(PpapiMsg_PPBGraphics3D_SwapBuffersACK
,
520 ppapi::HostResource
/* graphics_3d */,
521 int32_t /* pp_error */)
524 IPC_MESSAGE_ROUTED1(PpapiMsg_PPBImageData_NotifyUnusedImageData
,
525 ppapi::HostResource
/* old_image_data */)
528 IPC_MESSAGE_ROUTED2(PpapiMsg_PPBInstance_MouseLockComplete
,
529 PP_Instance
/* instance */,
530 int32_t /* result */)
533 IPC_SYNC_MESSAGE_ROUTED3_2(PpapiMsg_PPPClass_HasProperty
,
534 int64
/* ppp_class */,
536 ppapi::proxy::SerializedVar
/* property */,
537 ppapi::proxy::SerializedVar
/* out_exception */,
539 IPC_SYNC_MESSAGE_ROUTED3_2(PpapiMsg_PPPClass_HasMethod
,
540 int64
/* ppp_class */,
542 ppapi::proxy::SerializedVar
/* method */,
543 ppapi::proxy::SerializedVar
/* out_exception */,
545 IPC_SYNC_MESSAGE_ROUTED3_2(PpapiMsg_PPPClass_GetProperty
,
546 int64
/* ppp_class */,
548 ppapi::proxy::SerializedVar
/* property */,
549 ppapi::proxy::SerializedVar
/* out_exception */,
550 ppapi::proxy::SerializedVar
/* result */)
551 IPC_SYNC_MESSAGE_ROUTED2_2(PpapiMsg_PPPClass_EnumerateProperties
,
552 int64
/* ppp_class */,
554 std::vector
<ppapi::proxy::SerializedVar
> /* props */,
555 ppapi::proxy::SerializedVar
/* out_exception */)
556 IPC_SYNC_MESSAGE_ROUTED4_1(PpapiMsg_PPPClass_SetProperty
,
557 int64
/* ppp_class */,
559 ppapi::proxy::SerializedVar
/* name */,
560 ppapi::proxy::SerializedVar
/* value */,
561 ppapi::proxy::SerializedVar
/* out_exception */)
562 IPC_SYNC_MESSAGE_ROUTED3_1(PpapiMsg_PPPClass_RemoveProperty
,
563 int64
/* ppp_class */,
565 ppapi::proxy::SerializedVar
/* property */,
566 ppapi::proxy::SerializedVar
/* out_exception */)
567 IPC_SYNC_MESSAGE_ROUTED4_2(PpapiMsg_PPPClass_Call
,
568 int64
/* ppp_class */,
570 ppapi::proxy::SerializedVar
/* method_name */,
571 std::vector
<ppapi::proxy::SerializedVar
> /* args */,
572 ppapi::proxy::SerializedVar
/* out_exception */,
573 ppapi::proxy::SerializedVar
/* result */)
574 IPC_SYNC_MESSAGE_ROUTED3_2(PpapiMsg_PPPClass_Construct
,
575 int64
/* ppp_class */,
577 std::vector
<ppapi::proxy::SerializedVar
> /* args */,
578 ppapi::proxy::SerializedVar
/* out_exception */,
579 ppapi::proxy::SerializedVar
/* result */)
580 IPC_MESSAGE_ROUTED2(PpapiMsg_PPPClass_Deallocate
,
581 int64
/* ppp_class */,
584 // PPP_Graphics3D_Dev.
585 IPC_MESSAGE_ROUTED1(PpapiMsg_PPPGraphics3D_ContextLost
,
586 PP_Instance
/* instance */)
589 IPC_MESSAGE_ROUTED2(PpapiMsg_PPPInputEvent_HandleInputEvent
,
590 PP_Instance
/* instance */,
591 ppapi::InputEventData
/* data */)
592 IPC_SYNC_MESSAGE_ROUTED2_1(PpapiMsg_PPPInputEvent_HandleFilteredInputEvent
,
593 PP_Instance
/* instance */,
594 ppapi::InputEventData
/* data */,
595 PP_Bool
/* result */)
598 IPC_SYNC_MESSAGE_ROUTED3_1(PpapiMsg_PPPInstance_DidCreate
,
599 PP_Instance
/* instance */,
600 std::vector
<std::string
> /* argn */,
601 std::vector
<std::string
> /* argv */,
602 PP_Bool
/* result */)
603 IPC_SYNC_MESSAGE_ROUTED1_0(PpapiMsg_PPPInstance_DidDestroy
,
604 PP_Instance
/* instance */)
605 IPC_MESSAGE_ROUTED3(PpapiMsg_PPPInstance_DidChangeView
,
606 PP_Instance
/* instance */,
607 ppapi::ViewData
/* new_data */,
608 PP_Bool
/* flash_fullscreen */)
609 IPC_MESSAGE_ROUTED2(PpapiMsg_PPPInstance_DidChangeFocus
,
610 PP_Instance
/* instance */,
611 PP_Bool
/* has_focus */)
612 IPC_MESSAGE_ROUTED3(PpapiMsg_PPPInstance_HandleDocumentLoad
,
613 PP_Instance
/* instance */,
614 int /* pending_loader_host_id */,
615 ppapi::URLResponseInfoData
/* response */)
618 IPC_MESSAGE_ROUTED2(PpapiMsg_PPPMessaging_HandleMessage
,
619 PP_Instance
/* instance */,
620 ppapi::proxy::SerializedVar
/* message */)
623 IPC_MESSAGE_ROUTED1(PpapiMsg_PPPMouseLock_MouseLockLost
,
624 PP_Instance
/* instance */)
626 // PPB_NetworkMonitor_Private.
627 IPC_MESSAGE_ROUTED2(PpapiMsg_PPBNetworkMonitor_NetworkList
,
628 uint32
/* plugin_dispatcher_id */,
629 ppapi::NetworkList
/* network_list */)
632 IPC_SYNC_MESSAGE_ROUTED1_1(PpapiMsg_PPPPrinting_QuerySupportedFormats
,
633 PP_Instance
/* instance */,
634 uint32_t /* result */)
635 IPC_SYNC_MESSAGE_ROUTED2_1(PpapiMsg_PPPPrinting_Begin
,
636 PP_Instance
/* instance */,
637 std::string
/* settings_string */,
638 int32_t /* result */)
639 IPC_SYNC_MESSAGE_ROUTED2_1(PpapiMsg_PPPPrinting_PrintPages
,
640 PP_Instance
/* instance */,
641 std::vector
<PP_PrintPageNumberRange_Dev
> /* pages */,
642 ppapi::HostResource
/* result */)
643 IPC_MESSAGE_ROUTED1(PpapiMsg_PPPPrinting_End
,
644 PP_Instance
/* instance */)
645 IPC_SYNC_MESSAGE_ROUTED1_1(PpapiMsg_PPPPrinting_IsScalingDisabled
,
646 PP_Instance
/* instance */,
650 IPC_MESSAGE_ROUTED2(PpapiMsg_PPPTextInput_RequestSurroundingText
,
651 PP_Instance
/* instance */,
652 uint32_t /* desired_number_of_characters */)
654 #if !defined(OS_NACL) && !defined(NACL_WIN64)
657 PpapiMsg_PPBBroker_ConnectComplete
,
658 ppapi::HostResource
/* broker */,
659 IPC::PlatformFileForTransit
/* handle */,
660 int32_t /* result */)
662 // PPP_ContentDecryptor_Dev
663 IPC_MESSAGE_ROUTED4(PpapiMsg_PPPContentDecryptor_GenerateKeyRequest
,
664 PP_Instance
/* instance */,
665 ppapi::proxy::SerializedVar
/* key_system, String */,
666 ppapi::proxy::SerializedVar
/* type, String */,
667 ppapi::proxy::SerializedVar
/* init_data, ArrayBuffer */)
668 IPC_MESSAGE_ROUTED4(PpapiMsg_PPPContentDecryptor_AddKey
,
669 PP_Instance
/* instance */,
670 ppapi::proxy::SerializedVar
/* session_id, String */,
671 ppapi::proxy::SerializedVar
/* key, ArrayBuffer */,
672 ppapi::proxy::SerializedVar
/* init_data, ArrayBuffer */)
673 IPC_MESSAGE_ROUTED2(PpapiMsg_PPPContentDecryptor_CancelKeyRequest
,
674 PP_Instance
/* instance */,
675 ppapi::proxy::SerializedVar
/* session_id, String */)
676 IPC_MESSAGE_ROUTED3(PpapiMsg_PPPContentDecryptor_Decrypt
,
677 PP_Instance
/* instance */,
678 ppapi::proxy::PPPDecryptor_Buffer
/* buffer */,
679 std::string
/* serialized_block_info */)
681 PpapiMsg_PPPContentDecryptor_InitializeAudioDecoder
,
682 PP_Instance
/* instance */,
683 std::string
/* serialized_decoder_config */,
684 ppapi::proxy::PPPDecryptor_Buffer
/* extra_data_buffer */)
686 PpapiMsg_PPPContentDecryptor_InitializeVideoDecoder
,
687 PP_Instance
/* instance */,
688 std::string
/* serialized_decoder_config */,
689 ppapi::proxy::PPPDecryptor_Buffer
/* extra_data_buffer. */)
690 IPC_MESSAGE_ROUTED3(PpapiMsg_PPPContentDecryptor_DeinitializeDecoder
,
691 PP_Instance
/* instance */,
692 PP_DecryptorStreamType
/* decoder_type */,
693 uint32_t /* request_id */)
694 IPC_MESSAGE_ROUTED3(PpapiMsg_PPPContentDecryptor_ResetDecoder
,
695 PP_Instance
/* instance */,
696 PP_DecryptorStreamType
/* decoder_type */,
697 uint32_t /* request_id */)
698 IPC_MESSAGE_ROUTED4(PpapiMsg_PPPContentDecryptor_DecryptAndDecode
,
699 PP_Instance
/* instance */,
700 PP_DecryptorStreamType
/* decoder_type */,
701 ppapi::proxy::PPPDecryptor_Buffer
/* buffer */,
702 std::string
/* serialized_block_info */)
703 #endif // !defined(OS_NACL) && !defined(NACL_WIN64)
705 // PPB_TCPSocket and PPB_TCPSocket_Private.
706 IPC_MESSAGE_ROUTED5(PpapiMsg_PPBTCPSocket_ConnectACK
,
707 uint32
/* plugin_dispatcher_id */,
708 uint32
/* socket_id */,
709 int32_t /* result */,
710 PP_NetAddress_Private
/* local_addr */,
711 PP_NetAddress_Private
/* remote_addr */)
712 IPC_MESSAGE_ROUTED4(PpapiMsg_PPBTCPSocket_SSLHandshakeACK
,
713 uint32
/* plugin_dispatcher_id */,
714 uint32
/* socket_id */,
715 bool /* succeeded */,
716 ppapi::PPB_X509Certificate_Fields
/* certificate_fields */)
717 IPC_MESSAGE_ROUTED4(PpapiMsg_PPBTCPSocket_ReadACK
,
718 uint32
/* plugin_dispatcher_id */,
719 uint32
/* socket_id */,
720 int32_t /* result */,
721 std::string
/* data */)
722 IPC_MESSAGE_ROUTED3(PpapiMsg_PPBTCPSocket_WriteACK
,
723 uint32
/* plugin_dispatcher_id */,
724 uint32
/* socket_id */,
725 int32_t /* result */)
726 IPC_MESSAGE_ROUTED3(PpapiMsg_PPBTCPSocket_SetOptionACK
,
727 uint32
/* plugin_dispatcher_id */,
728 uint32
/* socket_id */,
729 int32_t /* result */)
731 // PPB_TCPServerSocket_Private.
733 // |socket_resource| should not be used as Resource in browser. The
734 // only purpose of this argument is to be echoed back.
735 // |status| == PP_ERROR_NOSPACE means that the socket table is full
736 // and new socket can't be initialized.
737 // |status| == PP_ERROR_FAILED means that socket is correctly
738 // initialized (if needed) but Listen call is failed.
739 // |status| == PP_OK means that socket is correctly initialized (if
740 // needed) and Listen call succeeds.
741 IPC_MESSAGE_ROUTED5(PpapiMsg_PPBTCPServerSocket_ListenACK
,
742 uint32
/* plugin_dispatcher_id */,
743 PP_Resource
/* socket_resource */,
744 uint32
/* socket_id */,
745 PP_NetAddress_Private
/* local_addr */,
746 int32_t /* status */)
747 IPC_MESSAGE_ROUTED5(PpapiMsg_PPBTCPServerSocket_AcceptACK
,
748 uint32
/* plugin_dispatcher_id */,
749 uint32
/* server_socket_id */,
750 uint32
/* accepted_socket_id */,
751 PP_NetAddress_Private
/* local_addr */,
752 PP_NetAddress_Private
/* remote_addr */)
754 #if !defined(OS_NACL) && !defined(NACL_WIN64)
755 // PPP_Instance_Private.
756 IPC_SYNC_MESSAGE_ROUTED1_1(PpapiMsg_PPPInstancePrivate_GetInstanceObject
,
757 PP_Instance
/* instance */,
758 ppapi::proxy::SerializedVar
/* result */)
760 // PPB_VideoDecoder_Dev.
761 // (Messages from renderer to plugin to notify it to run callbacks.)
762 IPC_MESSAGE_ROUTED3(PpapiMsg_PPBVideoDecoder_EndOfBitstreamACK
,
763 ppapi::HostResource
/* video_decoder */,
764 int32_t /* bitstream buffer id */,
765 int32_t /* PP_CompletionCallback result */)
766 IPC_MESSAGE_ROUTED2(PpapiMsg_PPBVideoDecoder_FlushACK
,
767 ppapi::HostResource
/* video_decoder */,
768 int32_t /* PP_CompletionCallback result */)
769 IPC_MESSAGE_ROUTED2(PpapiMsg_PPBVideoDecoder_ResetACK
,
770 ppapi::HostResource
/* video_decoder */,
771 int32_t /* PP_CompletionCallback result */)
773 // PPP_VideoDecoder_Dev.
774 IPC_MESSAGE_ROUTED4(PpapiMsg_PPPVideoDecoder_ProvidePictureBuffers
,
775 ppapi::HostResource
/* video_decoder */,
776 uint32_t /* requested number of buffers */,
777 PP_Size
/* dimensions of buffers */,
778 uint32_t /* texture_target */)
779 IPC_MESSAGE_ROUTED2(PpapiMsg_PPPVideoDecoder_DismissPictureBuffer
,
780 ppapi::HostResource
/* video_decoder */,
781 int32_t /* picture buffer id */)
782 IPC_MESSAGE_ROUTED2(PpapiMsg_PPPVideoDecoder_PictureReady
,
783 ppapi::HostResource
/* video_decoder */,
784 PP_Picture_Dev
/* output picture */)
785 IPC_MESSAGE_ROUTED2(PpapiMsg_PPPVideoDecoder_NotifyError
,
786 ppapi::HostResource
/* video_decoder */,
787 PP_VideoDecodeError_Dev
/* error */)
788 #endif // !defined(OS_NACL) && !defined(NACL_WIN64)
790 // -----------------------------------------------------------------------------
791 // These are from the plugin to the renderer.
793 // Reply to PpapiMsg_CreateChannel. The handle will be NULL if the channel
794 // could not be established. This could be because the IPC could not be created
795 // for some weird reason, but more likely that the plugin failed to load or
796 // initialize properly.
797 IPC_MESSAGE_CONTROL1(PpapiHostMsg_ChannelCreated
,
798 IPC::ChannelHandle
/* handle */)
800 // Logs the given message to the console of all instances.
801 IPC_MESSAGE_CONTROL4(PpapiHostMsg_LogWithSource
,
802 PP_Instance
/* instance */,
804 std::string
/* source */,
805 std::string
/* value */)
808 IPC_SYNC_MESSAGE_ROUTED3_1(PpapiHostMsg_PPBAudio_Create
,
809 PP_Instance
/* instance_id */,
810 int32_t /* sample_rate */,
811 uint32_t /* sample_frame_count */,
812 ppapi::HostResource
/* result */)
813 IPC_MESSAGE_ROUTED2(PpapiHostMsg_PPBAudio_StartOrStop
,
814 ppapi::HostResource
/* audio_id */,
818 IPC_MESSAGE_ROUTED1(PpapiHostMsg_PPBCore_AddRefResource
,
820 IPC_MESSAGE_ROUTED1(PpapiHostMsg_PPBCore_ReleaseResource
,
824 // TODO(teravest): Remove these messages when we've switched over to the "new"
826 IPC_SYNC_MESSAGE_ROUTED3_1(PpapiHostMsg_PPBFileRef_Create
,
827 PP_Instance
/* instance */,
828 PP_Resource
/* file_system */,
829 std::string
/* path */,
830 ppapi::PPB_FileRef_CreateInfo
/* result */)
831 IPC_SYNC_MESSAGE_ROUTED1_1(PpapiHostMsg_PPBFileRef_GetParent
,
832 ppapi::HostResource
/* file_ref */,
833 ppapi::PPB_FileRef_CreateInfo
/* result */)
834 IPC_MESSAGE_ROUTED3(PpapiHostMsg_PPBFileRef_MakeDirectory
,
835 ppapi::HostResource
/* file_ref */,
836 PP_Bool
/* make_ancestors */,
837 uint32_t /* callback_id */)
838 IPC_MESSAGE_ROUTED4(PpapiHostMsg_PPBFileRef_Touch
,
839 ppapi::HostResource
/* file_ref */,
840 PP_Time
/* last_access */,
841 PP_Time
/* last_modified */,
842 uint32_t /* callback_id */)
843 IPC_MESSAGE_ROUTED2(PpapiHostMsg_PPBFileRef_Delete
,
844 ppapi::HostResource
/* file_ref */,
845 uint32_t /* callback_id */)
846 IPC_MESSAGE_ROUTED3(PpapiHostMsg_PPBFileRef_Rename
,
847 ppapi::HostResource
/* file_ref */,
848 ppapi::HostResource
/* new_file_ref */,
849 uint32_t /* callback_id */)
850 IPC_MESSAGE_ROUTED2(PpapiHostMsg_PPBFileRef_Query
,
851 ppapi::HostResource
/* file_ref */,
852 uint32_t /* callback_id */)
853 IPC_SYNC_MESSAGE_ROUTED1_1(PpapiHostMsg_PPBFileRef_GetAbsolutePath
,
854 ppapi::HostResource
/* file_ref */,
855 ppapi::proxy::SerializedVar
/* result */)
856 IPC_MESSAGE_ROUTED2(PpapiHostMsg_PPBFileRef_ReadDirectoryEntries
,
857 ppapi::HostResource
/* file_ref */,
858 uint32_t /* callback_id */)
861 IPC_SYNC_MESSAGE_ROUTED3_1(PpapiHostMsg_PPBGraphics3D_Create
,
862 PP_Instance
/* instance */,
863 ppapi::HostResource
/* share_context */,
864 std::vector
<int32_t> /* attrib_list */,
865 ppapi::HostResource
/* result */)
866 IPC_SYNC_MESSAGE_ROUTED2_0(PpapiHostMsg_PPBGraphics3D_SetGetBuffer
,
867 ppapi::HostResource
/* context */,
868 int32
/* transfer_buffer_id */)
869 IPC_SYNC_MESSAGE_ROUTED1_2(PpapiHostMsg_PPBGraphics3D_GetState
,
870 ppapi::HostResource
/* context */,
871 gpu::CommandBuffer::State
/* state */,
873 IPC_SYNC_MESSAGE_ROUTED3_2(PpapiHostMsg_PPBGraphics3D_Flush
,
874 ppapi::HostResource
/* context */,
875 int32
/* put_offset */,
876 int32
/* last_known_get */,
877 gpu::CommandBuffer::State
/* state */,
879 IPC_MESSAGE_ROUTED2(PpapiHostMsg_PPBGraphics3D_AsyncFlush
,
880 ppapi::HostResource
/* context */,
881 int32
/* put_offset */)
882 IPC_SYNC_MESSAGE_ROUTED2_1(PpapiHostMsg_PPBGraphics3D_CreateTransferBuffer
,
883 ppapi::HostResource
/* context */,
886 IPC_SYNC_MESSAGE_ROUTED2_0(PpapiHostMsg_PPBGraphics3D_DestroyTransferBuffer
,
887 ppapi::HostResource
/* context */,
889 IPC_SYNC_MESSAGE_ROUTED2_1(PpapiHostMsg_PPBGraphics3D_GetTransferBuffer
,
890 ppapi::HostResource
/* context */,
892 ppapi::proxy::SerializedHandle
/* transfer_buffer */)
893 IPC_MESSAGE_ROUTED1(PpapiHostMsg_PPBGraphics3D_SwapBuffers
,
894 ppapi::HostResource
/* graphics_3d */)
895 IPC_SYNC_MESSAGE_ROUTED1_1(PpapiHostMsg_PPBGraphics3D_InsertSyncPoint
,
896 ppapi::HostResource
/* context */,
897 uint32
/* sync_point */)
900 IPC_SYNC_MESSAGE_ROUTED4_3(PpapiHostMsg_PPBImageData_CreatePlatform
,
901 PP_Instance
/* instance */,
904 PP_Bool
/* init_to_zero */,
905 ppapi::HostResource
/* result_resource */,
906 PP_ImageDataDesc
/* image_data_desc */,
907 ppapi::proxy::ImageHandle
/* result */)
908 IPC_SYNC_MESSAGE_ROUTED4_3(PpapiHostMsg_PPBImageData_CreateSimple
,
909 PP_Instance
/* instance */,
912 PP_Bool
/* init_to_zero */,
913 ppapi::HostResource
/* result_resource */,
914 PP_ImageDataDesc
/* image_data_desc */,
915 ppapi::proxy::SerializedHandle
/* result */)
918 IPC_SYNC_MESSAGE_ROUTED1_1(PpapiHostMsg_PPBInstance_GetWindowObject
,
919 PP_Instance
/* instance */,
920 ppapi::proxy::SerializedVar
/* result */)
921 IPC_SYNC_MESSAGE_ROUTED1_1(PpapiHostMsg_PPBInstance_GetOwnerElementObject
,
922 PP_Instance
/* instance */,
923 ppapi::proxy::SerializedVar
/* result */)
924 IPC_MESSAGE_ROUTED2(PpapiHostMsg_PPBInstance_BindGraphics
,
925 PP_Instance
/* instance */,
926 PP_Resource
/* device */)
927 IPC_SYNC_MESSAGE_ROUTED1_1(
928 PpapiHostMsg_PPBInstance_GetAudioHardwareOutputSampleRate
,
929 PP_Instance
/* instance */,
930 uint32_t /* result */)
931 IPC_SYNC_MESSAGE_ROUTED1_1(
932 PpapiHostMsg_PPBInstance_GetAudioHardwareOutputBufferSize
,
933 PP_Instance
/* instance */,
934 uint32_t /* result */)
935 IPC_SYNC_MESSAGE_ROUTED1_1(PpapiHostMsg_PPBInstance_IsFullFrame
,
936 PP_Instance
/* instance */,
937 PP_Bool
/* result */)
938 IPC_SYNC_MESSAGE_ROUTED2_2(PpapiHostMsg_PPBInstance_ExecuteScript
,
939 PP_Instance
/* instance */,
940 ppapi::proxy::SerializedVar
/* script */,
941 ppapi::proxy::SerializedVar
/* out_exception */,
942 ppapi::proxy::SerializedVar
/* result */)
943 IPC_SYNC_MESSAGE_ROUTED1_1(PpapiHostMsg_PPBInstance_GetDefaultCharSet
,
944 PP_Instance
/* instance */,
945 ppapi::proxy::SerializedVar
/* result */)
946 IPC_SYNC_MESSAGE_ROUTED2_1(PpapiHostMsg_PPBInstance_SetFullscreen
,
947 PP_Instance
/* instance */,
948 PP_Bool
/* fullscreen */,
949 PP_Bool
/* result */)
950 IPC_SYNC_MESSAGE_ROUTED1_2(PpapiHostMsg_PPBInstance_GetScreenSize
,
951 PP_Instance
/* instance */,
952 PP_Bool
/* result */,
954 IPC_MESSAGE_ROUTED3(PpapiHostMsg_PPBInstance_RequestInputEvents
,
955 PP_Instance
/* instance */,
956 bool /* is_filtering */,
957 uint32_t /* event_classes */)
958 IPC_MESSAGE_ROUTED2(PpapiHostMsg_PPBInstance_ClearInputEvents
,
959 PP_Instance
/* instance */,
960 uint32_t /* event_classes */)
961 IPC_MESSAGE_ROUTED2(PpapiHostMsg_PPBInstance_PostMessage
,
962 PP_Instance
/* instance */,
963 ppapi::proxy::SerializedVar
/* message */)
964 IPC_MESSAGE_ROUTED1(PpapiHostMsg_PPBInstance_LockMouse
,
965 PP_Instance
/* instance */)
966 IPC_MESSAGE_ROUTED1(PpapiHostMsg_PPBInstance_UnlockMouse
,
967 PP_Instance
/* instance */)
968 IPC_SYNC_MESSAGE_ROUTED2_1(PpapiHostMsg_PPBInstance_ResolveRelativeToDocument
,
969 PP_Instance
/* instance */,
970 ppapi::proxy::SerializedVar
/* relative */,
971 ppapi::proxy::SerializedVar
/* result */)
972 IPC_SYNC_MESSAGE_ROUTED2_1(PpapiHostMsg_PPBInstance_DocumentCanRequest
,
973 PP_Instance
/* instance */,
974 ppapi::proxy::SerializedVar
/* relative */,
975 PP_Bool
/* result */)
976 IPC_SYNC_MESSAGE_ROUTED2_1(PpapiHostMsg_PPBInstance_DocumentCanAccessDocument
,
977 PP_Instance
/* active */,
978 PP_Instance
/* target */,
979 PP_Bool
/* result */)
980 IPC_SYNC_MESSAGE_ROUTED1_2(PpapiHostMsg_PPBInstance_GetDocumentURL
,
981 PP_Instance
/* active */,
982 PP_URLComponents_Dev
/* components */,
983 ppapi::proxy::SerializedVar
/* result */)
984 IPC_SYNC_MESSAGE_ROUTED1_1(PpapiHostMsg_PPBInstance_GetPluginInstanceURL
,
985 PP_Instance
/* active */,
986 ppapi::proxy::SerializedVar
/* result */)
987 IPC_MESSAGE_ROUTED4(PpapiHostMsg_PPBInstance_SetCursor
,
988 PP_Instance
/* instance */,
990 ppapi::HostResource
/* custom_image */,
991 PP_Point
/* hot_spot */)
992 IPC_MESSAGE_ROUTED2(PpapiHostMsg_PPBInstance_SetTextInputType
,
993 PP_Instance
/* instance */,
994 PP_TextInput_Type
/* type */)
995 IPC_MESSAGE_ROUTED3(PpapiHostMsg_PPBInstance_UpdateCaretPosition
,
996 PP_Instance
/* instance */,
998 PP_Rect
/* bounding_box */)
999 IPC_MESSAGE_ROUTED1(PpapiHostMsg_PPBInstance_CancelCompositionText
,
1000 PP_Instance
/* instance */)
1001 IPC_MESSAGE_ROUTED4(PpapiHostMsg_PPBInstance_UpdateSurroundingText
,
1002 PP_Instance
/* instance */,
1003 std::string
/* text */,
1004 uint32_t /* caret */,
1005 uint32_t /* anchor */)
1008 IPC_SYNC_MESSAGE_ROUTED1_1(PpapiHostMsg_PPBVar_AddRefObject
,
1009 int64
/* object_id */,
1010 int /* unused - need a return value for sync msgs */)
1011 IPC_MESSAGE_ROUTED1(PpapiHostMsg_PPBVar_ReleaseObject
,
1012 int64
/* object_id */)
1013 IPC_SYNC_MESSAGE_ROUTED2_2(PpapiHostMsg_PPBVar_HasProperty
,
1014 ppapi::proxy::SerializedVar
/* object */,
1015 ppapi::proxy::SerializedVar
/* property */,
1016 ppapi::proxy::SerializedVar
/* out_exception */,
1017 PP_Bool
/* result */)
1018 IPC_SYNC_MESSAGE_ROUTED2_2(PpapiHostMsg_PPBVar_HasMethodDeprecated
,
1019 ppapi::proxy::SerializedVar
/* object */,
1020 ppapi::proxy::SerializedVar
/* method */,
1021 ppapi::proxy::SerializedVar
/* out_exception */,
1022 PP_Bool
/* result */)
1023 IPC_SYNC_MESSAGE_ROUTED2_2(PpapiHostMsg_PPBVar_GetProperty
,
1024 ppapi::proxy::SerializedVar
/* object */,
1025 ppapi::proxy::SerializedVar
/* property */,
1026 ppapi::proxy::SerializedVar
/* out_exception */,
1027 ppapi::proxy::SerializedVar
/* result */)
1028 IPC_SYNC_MESSAGE_ROUTED2_2(PpapiHostMsg_PPBVar_DeleteProperty
,
1029 ppapi::proxy::SerializedVar
/* object */,
1030 ppapi::proxy::SerializedVar
/* property */,
1031 ppapi::proxy::SerializedVar
/* out_exception */,
1032 PP_Bool
/* result */)
1033 IPC_SYNC_MESSAGE_ROUTED1_2(PpapiHostMsg_PPBVar_EnumerateProperties
,
1034 ppapi::proxy::SerializedVar
/* object */,
1035 std::vector
<ppapi::proxy::SerializedVar
> /* props */,
1036 ppapi::proxy::SerializedVar
/* out_exception */)
1037 IPC_SYNC_MESSAGE_ROUTED3_1(PpapiHostMsg_PPBVar_SetPropertyDeprecated
,
1038 ppapi::proxy::SerializedVar
/* object */,
1039 ppapi::proxy::SerializedVar
/* name */,
1040 ppapi::proxy::SerializedVar
/* value */,
1041 ppapi::proxy::SerializedVar
/* out_exception */)
1042 IPC_SYNC_MESSAGE_ROUTED3_2(PpapiHostMsg_PPBVar_CallDeprecated
,
1043 ppapi::proxy::SerializedVar
/* object */,
1044 ppapi::proxy::SerializedVar
/* method_name */,
1045 std::vector
<ppapi::proxy::SerializedVar
> /* args */,
1046 ppapi::proxy::SerializedVar
/* out_exception */,
1047 ppapi::proxy::SerializedVar
/* result */)
1048 IPC_SYNC_MESSAGE_ROUTED2_2(PpapiHostMsg_PPBVar_Construct
,
1049 ppapi::proxy::SerializedVar
/* object */,
1050 std::vector
<ppapi::proxy::SerializedVar
> /* args */,
1051 ppapi::proxy::SerializedVar
/* out_exception */,
1052 ppapi::proxy::SerializedVar
/* result */)
1053 IPC_SYNC_MESSAGE_ROUTED2_2(PpapiHostMsg_PPBVar_IsInstanceOfDeprecated
,
1054 ppapi::proxy::SerializedVar
/* var */,
1055 int64
/* object_class */,
1056 int64
/* object-data */,
1057 PP_Bool
/* result */)
1058 IPC_SYNC_MESSAGE_ROUTED3_1(PpapiHostMsg_PPBVar_CreateObjectDeprecated
,
1059 PP_Instance
/* instance */,
1060 int64
/* object_class */,
1061 int64
/* object_data */,
1062 ppapi::proxy::SerializedVar
/* result */)
1064 #if !defined(OS_NACL) && !defined(NACL_WIN64)
1066 IPC_SYNC_MESSAGE_ROUTED1_1(PpapiHostMsg_PPBBroker_Create
,
1067 PP_Instance
/* instance */,
1068 ppapi::HostResource
/* result_resource */)
1069 IPC_MESSAGE_ROUTED1(PpapiHostMsg_PPBBroker_Connect
,
1070 ppapi::HostResource
/* broker */)
1073 IPC_SYNC_MESSAGE_ROUTED2_2(
1074 PpapiHostMsg_PPBBuffer_Create
,
1075 PP_Instance
/* instance */,
1076 uint32_t /* size */,
1077 ppapi::HostResource
/* result_resource */,
1078 ppapi::proxy::SerializedHandle
/* result_shm_handle */)
1080 // PPB_ContentDecryptor_Dev messages handled in PPB_Instance_Proxy.
1081 IPC_MESSAGE_ROUTED4(PpapiHostMsg_PPBInstance_NeedKey
,
1082 PP_Instance
/* instance */,
1083 ppapi::proxy::SerializedVar
/* key_system, String */,
1084 ppapi::proxy::SerializedVar
/* session_id, String */,
1085 ppapi::proxy::SerializedVar
/* init_data, ArrayBuffer */)
1086 IPC_MESSAGE_ROUTED3(PpapiHostMsg_PPBInstance_KeyAdded
,
1087 PP_Instance
/* instance */,
1088 ppapi::proxy::SerializedVar
/* key_system, String */,
1089 ppapi::proxy::SerializedVar
/* session_id, String */)
1090 IPC_MESSAGE_ROUTED5(PpapiHostMsg_PPBInstance_KeyMessage
,
1091 PP_Instance
/* instance */,
1092 ppapi::proxy::SerializedVar
/* key_system, String */,
1093 ppapi::proxy::SerializedVar
/* session_id, String */,
1094 ppapi::proxy::SerializedVar
/* message, ArrayBuffer */,
1095 ppapi::proxy::SerializedVar
/* default_url, String */)
1096 IPC_MESSAGE_ROUTED5(PpapiHostMsg_PPBInstance_KeyError
,
1097 PP_Instance
/* instance */,
1098 ppapi::proxy::SerializedVar
/* key_system, String */,
1099 ppapi::proxy::SerializedVar
/* session_id, String */,
1100 int32_t /* media_error */,
1101 int32_t /* system_code */)
1102 IPC_MESSAGE_ROUTED3(PpapiHostMsg_PPBInstance_DeliverBlock
,
1103 PP_Instance
/* instance */,
1104 PP_Resource
/* decrypted_block, PPB_Buffer_Dev */,
1105 std::string
/* serialized_block_info */)
1106 IPC_MESSAGE_ROUTED4(PpapiHostMsg_PPBInstance_DecoderInitializeDone
,
1107 PP_Instance
/* instance */,
1108 PP_DecryptorStreamType
/* decoder_type */,
1109 uint32_t /* request_id */,
1110 PP_Bool
/* success */)
1111 IPC_MESSAGE_ROUTED3(PpapiHostMsg_PPBInstance_DecoderDeinitializeDone
,
1112 PP_Instance
/* instance */,
1113 PP_DecryptorStreamType
/* decoder_type */,
1114 uint32_t /* request_id */)
1115 IPC_MESSAGE_ROUTED3(PpapiHostMsg_PPBInstance_DecoderResetDone
,
1116 PP_Instance
/* instance */,
1117 PP_DecryptorStreamType
/* decoder_type */,
1118 uint32_t /* request_id */)
1119 IPC_MESSAGE_ROUTED3(PpapiHostMsg_PPBInstance_DeliverFrame
,
1120 PP_Instance
/* instance */,
1121 PP_Resource
/* decrypted_frame, PPB_Buffer_Dev */,
1122 std::string
/* serialized_block_info */)
1123 IPC_MESSAGE_ROUTED3(PpapiHostMsg_PPBInstance_DeliverSamples
,
1124 PP_Instance
/* instance */,
1125 PP_Resource
/* audio_frames, PPB_Buffer_Dev */,
1126 std::string
/* serialized_block_info */)
1127 #endif // !defined(OS_NACL) && !defined(NACL_WIN64)
1129 // PPB_NetworkMonitor_Private.
1130 IPC_MESSAGE_CONTROL1(PpapiHostMsg_PPBNetworkMonitor_Start
,
1131 uint32
/* plugin_dispatcher_id */)
1132 IPC_MESSAGE_CONTROL1(PpapiHostMsg_PPBNetworkMonitor_Stop
,
1133 uint32
/* plugin_dispatcher_id */)
1136 IPC_SYNC_MESSAGE_ROUTED3_1(
1137 PpapiHostMsg_PPBTesting_ReadImageData
,
1138 ppapi::HostResource
/* device_context_2d */,
1139 ppapi::HostResource
/* image */,
1140 PP_Point
/* top_left */,
1141 PP_Bool
/* result */)
1142 IPC_SYNC_MESSAGE_ROUTED1_1(PpapiHostMsg_PPBTesting_GetLiveObjectsForInstance
,
1143 PP_Instance
/* instance */,
1144 uint32
/* result */)
1145 IPC_SYNC_MESSAGE_ROUTED2_0(PpapiHostMsg_PPBTesting_SimulateInputEvent
,
1146 PP_Instance
/* instance */,
1147 ppapi::InputEventData
/* input_event */)
1148 IPC_SYNC_MESSAGE_ROUTED1_0(
1149 PpapiHostMsg_PPBTesting_SetMinimumArrayBufferSizeForShmem
,
1150 uint32_t /* threshold */)
1152 #if !defined(OS_NACL) && !defined(NACL_WIN64)
1154 // PPB_VideoDecoder.
1155 IPC_SYNC_MESSAGE_ROUTED3_1(PpapiHostMsg_PPBVideoDecoder_Create
,
1156 PP_Instance
/* instance */,
1157 ppapi::HostResource
/* context */,
1158 PP_VideoDecoder_Profile
/* profile */,
1159 ppapi::HostResource
/* result */)
1160 IPC_MESSAGE_ROUTED4(PpapiHostMsg_PPBVideoDecoder_Decode
,
1161 ppapi::HostResource
/* video_decoder */,
1162 ppapi::HostResource
/* bitstream buffer */,
1163 int32
/* bitstream buffer id */,
1164 uint32
/* size of buffer */)
1165 IPC_MESSAGE_ROUTED2(PpapiHostMsg_PPBVideoDecoder_AssignPictureBuffers
,
1166 ppapi::HostResource
/* video_decoder */,
1167 std::vector
<PP_PictureBuffer_Dev
> /* picture buffers */)
1168 IPC_MESSAGE_ROUTED2(PpapiHostMsg_PPBVideoDecoder_ReusePictureBuffer
,
1169 ppapi::HostResource
/* video_decoder */,
1170 int32_t /* picture buffer id */)
1171 IPC_MESSAGE_ROUTED1(PpapiHostMsg_PPBVideoDecoder_Flush
,
1172 ppapi::HostResource
/* video_decoder */)
1173 IPC_MESSAGE_ROUTED1(PpapiHostMsg_PPBVideoDecoder_Reset
,
1174 ppapi::HostResource
/* video_decoder */)
1175 IPC_SYNC_MESSAGE_ROUTED1_0(PpapiHostMsg_PPBVideoDecoder_Destroy
,
1176 ppapi::HostResource
/* video_decoder */)
1178 // PPB_Flash_MessageLoop.
1179 IPC_SYNC_MESSAGE_ROUTED1_1(PpapiHostMsg_PPBFlashMessageLoop_Create
,
1180 PP_Instance
/* instance */,
1181 ppapi::HostResource
/* result */)
1182 IPC_SYNC_MESSAGE_ROUTED1_1(PpapiHostMsg_PPBFlashMessageLoop_Run
,
1183 ppapi::HostResource
/* flash_message_loop */,
1184 int32_t /* result */)
1185 IPC_SYNC_MESSAGE_ROUTED1_0(PpapiHostMsg_PPBFlashMessageLoop_Quit
,
1186 ppapi::HostResource
/* flash_message_loop */)
1187 #endif // !defined(OS_NACL) && !defined(NACL_WIN64)
1189 // PPB_TCPSocket and PPB_TCPSocket_Private.
1190 // Creates a PPB_TCPSocket resource.
1191 IPC_SYNC_MESSAGE_CONTROL2_1(PpapiHostMsg_PPBTCPSocket_Create
,
1192 int32
/* routing_id */,
1193 uint32
/* plugin_dispatcher_id */,
1194 uint32
/* socket_id */)
1195 // Creates a PPB_TCPSocket_Private resource.
1196 IPC_SYNC_MESSAGE_CONTROL2_1(PpapiHostMsg_PPBTCPSocket_CreatePrivate
,
1197 int32
/* routing_id */,
1198 uint32
/* plugin_dispatcher_id */,
1199 uint32
/* socket_id */)
1200 IPC_MESSAGE_CONTROL4(PpapiHostMsg_PPBTCPSocket_Connect
,
1201 int32
/* routing_id */,
1202 uint32
/* socket_id */,
1203 std::string
/* host */,
1204 uint16_t /* port */)
1205 IPC_MESSAGE_CONTROL3(PpapiHostMsg_PPBTCPSocket_ConnectWithNetAddress
,
1206 int32
/* routing_id */,
1207 uint32
/* socket_id */,
1208 PP_NetAddress_Private
/* net_addr */)
1209 IPC_MESSAGE_CONTROL5(PpapiHostMsg_PPBTCPSocket_SSLHandshake
,
1210 uint32
/* socket_id */,
1211 std::string
/* server_name */,
1212 uint16_t /* server_port */,
1213 std::vector
<std::vector
<char> > /* trusted_certs */,
1214 std::vector
<std::vector
<char> > /* untrusted_certs */)
1215 IPC_MESSAGE_CONTROL2(PpapiHostMsg_PPBTCPSocket_Read
,
1216 uint32
/* socket_id */,
1217 int32_t /* bytes_to_read */)
1218 IPC_MESSAGE_CONTROL2(PpapiHostMsg_PPBTCPSocket_Write
,
1219 uint32
/* socket_id */,
1220 std::string
/* data */)
1221 IPC_MESSAGE_CONTROL1(PpapiHostMsg_PPBTCPSocket_Disconnect
,
1222 uint32
/* socket_id */)
1223 IPC_MESSAGE_CONTROL3(PpapiHostMsg_PPBTCPSocket_SetOption
,
1224 uint32
/* socket_id */,
1225 PP_TCPSocket_Option
/* name */,
1226 ppapi::SocketOptionData
/* value */)
1228 // PPB_TCPServerSocket_Private.
1229 IPC_MESSAGE_CONTROL5(PpapiHostMsg_PPBTCPServerSocket_Listen
,
1230 int32
/* routing_id */,
1231 uint32
/* plugin_dispatcher_id */,
1232 PP_Resource
/* socket_resource */,
1233 PP_NetAddress_Private
/* addr */,
1234 int32_t /* backlog */)
1235 IPC_MESSAGE_CONTROL2(PpapiHostMsg_PPBTCPServerSocket_Accept
,
1236 int32
/* tcp_client_socket_routing_id */,
1237 uint32
/* server_socket_id */)
1238 IPC_MESSAGE_CONTROL1(PpapiHostMsg_PPBTCPServerSocket_Destroy
,
1239 uint32
/* socket_id */)
1241 // PPB_X509Certificate_Private
1242 IPC_SYNC_MESSAGE_CONTROL1_2(PpapiHostMsg_PPBX509Certificate_ParseDER
,
1243 std::vector
<char> /* der */,
1244 bool /* succeeded */,
1245 ppapi::PPB_X509Certificate_Fields
/* result */)
1247 //-----------------------------------------------------------------------------
1248 // Resource call/reply messages.
1250 // These are the new-style resource implementations where the resource is only
1251 // implemented in the proxy and "resource messages" are sent between this and a
1252 // host object. Resource messages are a wrapper around some general routing
1253 // information and a separate message of a type defined by the specific resource
1254 // sending/receiving it. The extra paremeters allow the nested message to be
1255 // routed automatically to the correct resource.
1257 // Notification that a resource has been created in the plugin. The nested
1258 // message will be resource-type-specific.
1259 IPC_MESSAGE_CONTROL3(PpapiHostMsg_ResourceCreated
,
1260 ppapi::proxy::ResourceMessageCallParams
/* call_params */,
1261 PP_Instance
/* instance */,
1262 IPC::Message
/* nested_msg */)
1264 // Notification that a resource has been destroyed in the plugin.
1265 IPC_MESSAGE_CONTROL1(PpapiHostMsg_ResourceDestroyed
,
1266 PP_Resource
/* resource */)
1268 // Most resources are created by the plugin, which then sends a ResourceCreated
1269 // message to create a corresponding ResourceHost in the renderer or browser
1270 // host process. However, some resources are first created in the host and
1271 // "pushed" or returned to the plugin.
1273 // In this case, the host will create a "pending" ResourceHost object which
1274 // is identified by an ID. The ID is sent to the plugin process and the
1275 // PluginResource object is created. This message is sent from the plugin to
1276 // the host process to connect the PluginResource and the pending ResourceHost
1277 // (at which point, it's no longer pending).
1278 IPC_MESSAGE_CONTROL2(PpapiHostMsg_AttachToPendingHost
,
1279 PP_Resource
/* resource */,
1280 int /* pending_host_id */)
1282 // A resource call is a request from the plugin to the host. It may or may not
1283 // require a reply, depending on the params. The nested message will be
1284 // resource-type-specific.
1285 IPC_MESSAGE_CONTROL2(PpapiHostMsg_ResourceCall
,
1286 ppapi::proxy::ResourceMessageCallParams
/* call_params */,
1287 IPC::Message
/* nested_msg */)
1289 // A resource reply is a response to a ResourceCall from a host to the
1290 // plugin. The resource ID + sequence number in the params will correspond to
1291 // that of the previous ResourceCall.
1292 IPC_MESSAGE_CONTROL2(
1293 PpapiPluginMsg_ResourceReply
,
1294 ppapi::proxy::ResourceMessageReplyParams
/* reply_params */,
1295 IPC::Message
/* nested_msg */)
1297 IPC_SYNC_MESSAGE_CONTROL2_2(PpapiHostMsg_ResourceSyncCall
,
1298 ppapi::proxy::ResourceMessageCallParams
/* call_params */,
1299 IPC::Message
/* nested_msg */,
1300 ppapi::proxy::ResourceMessageReplyParams
/* reply_params */,
1301 IPC::Message
/* reply_msg */)
1303 // This message is sent from the renderer to the browser when it wants to create
1304 // a ResourceHost in the browser. It contains the process ID of the plugin and
1305 // the instance of the plugin for which to create the resource for. params
1306 // contains the sequence number for the message to track the response.
1307 // The nested message is a ResourceHost creation message.
1308 IPC_MESSAGE_CONTROL4(
1309 PpapiHostMsg_CreateResourceHostFromHost
,
1310 int /* child_process_id */,
1311 ppapi::proxy::ResourceMessageCallParams
/* params */,
1312 PP_Instance
/* instance */,
1313 IPC::Message
/* nested_msg */)
1315 // This message is sent from the browser to the renderer when it has created a
1316 // ResourceHost for the renderer. It contains the sequence number that was sent
1317 // in the request and the ID of the pending ResourceHost which was created in
1318 // the browser. This ID is only useful for the plugin which can attach to the
1319 // ResourceHost in the browser.
1320 IPC_MESSAGE_CONTROL2(
1321 PpapiHostMsg_CreateResourceHostFromHostReply
,
1322 int32_t /* sequence */,
1323 int /* pending_host_id */)
1325 //-----------------------------------------------------------------------------
1326 // Messages for resources using call/reply above.
1328 // Broker ----------------------------------------------------------------------
1329 IPC_MESSAGE_CONTROL0(PpapiHostMsg_Broker_Create
)
1331 // Queries whether the plugin has permission to connect to the Pepper broker.
1332 // The response is contained in the error value of the
1333 // ResourceMessageReplyParams in the reply message.
1334 IPC_MESSAGE_CONTROL0(PpapiHostMsg_Broker_IsAllowed
)
1336 // Extensions common -----------------------------------------------------------
1337 IPC_MESSAGE_CONTROL0(PpapiHostMsg_ExtensionsCommon_Create
)
1339 // Starts an extension API request which doesn't expect a response.
1340 // |request_name| is an API function name. |args| is a list of input arguments.
1341 IPC_MESSAGE_CONTROL2(PpapiHostMsg_ExtensionsCommon_Post
,
1342 std::string
/* request_name */,
1343 base::ListValue
/* args */)
1345 // Starts an extension API request which expects a response sent back using a
1346 // PpapiPluginMsg_ExtensionsCommon_CallReply message.
1347 // |request_name| is an API function name. |args| is a list of input arguments.
1348 // |output| is a list of output results.
1349 IPC_MESSAGE_CONTROL2(PpapiHostMsg_ExtensionsCommon_Call
,
1350 std::string
/* request_name */,
1351 base::ListValue
/* args */)
1352 IPC_MESSAGE_CONTROL1(PpapiPluginMsg_ExtensionsCommon_CallReply
,
1353 base::ListValue
/* output */)
1355 // Ext_CrxFileSystem
1356 IPC_MESSAGE_CONTROL0(PpapiHostMsg_Ext_CrxFileSystem_Create
)
1357 IPC_MESSAGE_CONTROL0(PpapiHostMsg_Ext_CrxFileSystem_BrowserOpen
)
1358 IPC_MESSAGE_CONTROL1(PpapiPluginMsg_Ext_CrxFileSystem_BrowserOpenReply
,
1359 std::string
/* fsid */)
1362 IPC_MESSAGE_CONTROL0(PpapiHostMsg_FileChooser_Create
)
1363 IPC_MESSAGE_CONTROL4(PpapiHostMsg_FileChooser_Show
,
1365 bool /* open_multiple */,
1366 std::string
/* suggested_file_name */,
1367 std::vector
<std::string
> /* accept_mime_types */)
1368 IPC_MESSAGE_CONTROL1(PpapiPluginMsg_FileChooser_ShowReply
,
1369 std::vector
<ppapi::PPB_FileRef_CreateInfo
> /* files */)
1372 IPC_MESSAGE_CONTROL0(PpapiHostMsg_FileIO_Create
)
1373 IPC_MESSAGE_CONTROL2(PpapiHostMsg_FileIO_Open
,
1374 PP_Resource
/* file_ref_resource */,
1375 int32_t /* open_flags */)
1376 IPC_MESSAGE_CONTROL0(PpapiPluginMsg_FileIO_OpenReply
)
1377 IPC_MESSAGE_CONTROL0(PpapiHostMsg_FileIO_Close
)
1378 IPC_MESSAGE_CONTROL0(PpapiHostMsg_FileIO_Query
)
1379 IPC_MESSAGE_CONTROL1(PpapiPluginMsg_FileIO_QueryReply
, PP_FileInfo
/* info */)
1380 IPC_MESSAGE_CONTROL2(PpapiHostMsg_FileIO_Touch
,
1381 PP_Time
/* last_access_time */,
1382 PP_Time
/* last_modified_time */)
1383 IPC_MESSAGE_CONTROL2(PpapiHostMsg_FileIO_Read
,
1384 int64_t /* offset */,
1385 int32_t /* bytes_to_read */)
1386 IPC_MESSAGE_CONTROL1(PpapiPluginMsg_FileIO_ReadReply
, std::string
/* data */)
1387 IPC_MESSAGE_CONTROL2(PpapiHostMsg_FileIO_Write
,
1388 int64_t /* offset */,
1389 std::string
/* data */)
1390 IPC_MESSAGE_CONTROL1(PpapiHostMsg_FileIO_SetLength
,
1391 int64_t /* length */)
1392 IPC_MESSAGE_CONTROL0(PpapiHostMsg_FileIO_Flush
)
1393 IPC_MESSAGE_CONTROL2(PpapiHostMsg_FileIO_WillWrite
,
1394 int64_t /* offset */,
1395 int32_t /* bytes_to_write */)
1396 IPC_MESSAGE_CONTROL1(PpapiHostMsg_FileIO_WillSetLength
,
1397 int64_t /* length */)
1398 IPC_MESSAGE_CONTROL0(PpapiHostMsg_FileIO_GetOSFileDescriptor
)
1399 IPC_MESSAGE_CONTROL1(PpapiPluginMsg_FileIO_GetOSFileDescriptorReply
,
1400 int32_t /* file descriptor */)
1401 IPC_MESSAGE_CONTROL0(PpapiHostMsg_FileIO_RequestOSFileHandle
)
1402 IPC_MESSAGE_CONTROL0(PpapiPluginMsg_FileIO_RequestOSFileHandleReply
)
1403 IPC_MESSAGE_CONTROL0(PpapiPluginMsg_FileIO_GeneralReply
)
1406 IPC_MESSAGE_CONTROL2(PpapiHostMsg_FileRef_CreateInternal
,
1407 PP_Resource
/* file_system */,
1408 std::string
/* internal_path */)
1410 // Requests that the browser create a directory at the location indicated by
1412 IPC_MESSAGE_CONTROL1(PpapiHostMsg_FileRef_MakeDirectory
,
1413 bool /* make_ancestors */)
1414 IPC_MESSAGE_CONTROL0(PpapiPluginMsg_FileRef_MakeDirectoryReply
)
1416 // Requests that the browser update the last accessed and last modified times
1417 // at the location indicated by the FileRef.
1418 IPC_MESSAGE_CONTROL2(PpapiHostMsg_FileRef_Touch
,
1419 PP_Time
/* last_accessed */,
1420 PP_Time
/* last_modified */)
1421 IPC_MESSAGE_CONTROL0(PpapiPluginMsg_FileRef_TouchReply
)
1423 // Requests that the browser delete a file or directory at the location
1424 // indicated by the FileRef.
1425 IPC_MESSAGE_CONTROL0(PpapiHostMsg_FileRef_Delete
)
1426 IPC_MESSAGE_CONTROL0(PpapiPluginMsg_FileRef_DeleteReply
)
1428 // Requests that the browser rename a file or directory at the location
1429 // indicated by the FileRef.
1430 IPC_MESSAGE_CONTROL1(PpapiHostMsg_FileRef_Rename
,
1431 PP_Resource
/* new_file_ref */)
1432 IPC_MESSAGE_CONTROL0(PpapiPluginMsg_FileRef_RenameReply
)
1434 // Requests that the browser retrieve metadata information for a file or
1435 // directory at the location indicated by the FileRef.
1436 IPC_MESSAGE_CONTROL0(PpapiHostMsg_FileRef_Query
)
1437 IPC_MESSAGE_CONTROL1(PpapiPluginMsg_FileRef_QueryReply
,
1438 PP_FileInfo
/* file_info */)
1440 // Requests that the browser retrieve then entries in a directory at the
1441 // location indicated by the FileRef.
1442 IPC_MESSAGE_CONTROL0(PpapiHostMsg_FileRef_ReadDirectoryEntries
)
1444 // FileRef_CreateInfo does not provide file type information, so two
1445 // corresponding vectors are returned.
1446 IPC_MESSAGE_CONTROL2(PpapiPluginMsg_FileRef_ReadDirectoryEntriesReply
,
1447 std::vector
<ppapi::FileRef_CreateInfo
> /* files */,
1448 std::vector
<PP_FileType
> /* file_types */)
1450 // Requests that the browser reply with the absolute path to the indicated
1452 IPC_MESSAGE_CONTROL0(PpapiHostMsg_FileRef_GetAbsolutePath
)
1453 IPC_MESSAGE_CONTROL1(PpapiPluginMsg_FileRef_GetAbsolutePathReply
,
1454 std::string
/* absolute_path */)
1457 IPC_MESSAGE_CONTROL1(PpapiHostMsg_FileSystem_Create
,
1458 PP_FileSystemType
/* type */)
1459 IPC_MESSAGE_CONTROL1(PpapiHostMsg_FileSystem_Open
,
1460 int64_t /* expected_size */)
1461 IPC_MESSAGE_CONTROL0(PpapiPluginMsg_FileSystem_OpenReply
)
1462 IPC_MESSAGE_CONTROL1(PpapiHostMsg_FileSystem_InitIsolatedFileSystem
,
1463 std::string
/* fsid */)
1465 // Flash DRM ------------------------------------------------------------------
1466 IPC_MESSAGE_CONTROL0(PpapiHostMsg_FlashDRM_Create
)
1468 // Requests the device ID.
1469 IPC_MESSAGE_CONTROL0(PpapiHostMsg_FlashDRM_GetDeviceID
)
1470 // Reply for GetDeviceID which includes the device ID as a string.
1471 IPC_MESSAGE_CONTROL1(PpapiPluginMsg_FlashDRM_GetDeviceIDReply
,
1472 std::string
/* id */)
1474 // Requests the HMONITOR corresponding to the monitor on which the instance is
1476 IPC_MESSAGE_CONTROL0(PpapiHostMsg_FlashDRM_GetHmonitor
)
1477 // Reply message for GetHmonitor which contains the HMONITOR as an int64_t.
1478 IPC_MESSAGE_CONTROL1(PpapiPluginMsg_FlashDRM_GetHmonitorReply
,
1479 int64_t /* hmonitor */)
1481 // Requests the voucher file which is used to verify the integrity of the Flash
1482 // module. A PPB_FileRef resource will be created.
1483 IPC_MESSAGE_CONTROL0(PpapiHostMsg_FlashDRM_GetVoucherFile
)
1484 // Reply message for GetVoucherFile which contains the CreateInfo for a
1485 // PPB_FileRef which points to the voucher file.
1486 IPC_MESSAGE_CONTROL1(PpapiPluginMsg_FlashDRM_GetVoucherFileReply
,
1487 ppapi::PPB_FileRef_CreateInfo
/* file_info */)
1490 IPC_MESSAGE_CONTROL0(PpapiHostMsg_Gamepad_Create
)
1492 // Requests that the gamepad host send the shared memory handle to the plugin
1494 IPC_MESSAGE_CONTROL0(PpapiHostMsg_Gamepad_RequestMemory
)
1496 // Reply to a RequestMemory call. This supplies the shared memory handle. The
1497 // actual handle is passed in the ReplyParams struct.
1498 IPC_MESSAGE_CONTROL0(PpapiPluginMsg_Gamepad_SendMemory
)
1501 // Graphics2D, plugin -> host
1502 IPC_MESSAGE_CONTROL2(PpapiHostMsg_Graphics2D_Create
,
1504 PP_Bool
/* is_always_opaque */)
1505 IPC_MESSAGE_CONTROL4(PpapiHostMsg_Graphics2D_PaintImageData
,
1506 ppapi::HostResource
/* image_data */,
1507 PP_Point
/* top_left */,
1508 bool /* src_rect_specified */,
1509 PP_Rect
/* src_rect */)
1510 IPC_MESSAGE_CONTROL3(PpapiHostMsg_Graphics2D_Scroll
,
1511 bool /* clip_specified */,
1513 PP_Point
/* amount */)
1514 IPC_MESSAGE_CONTROL1(PpapiHostMsg_Graphics2D_ReplaceContents
,
1515 ppapi::HostResource
/* image_data */)
1516 IPC_MESSAGE_CONTROL1(PpapiHostMsg_Graphics2D_Dev_SetScale
,
1519 // Graphics2D, plugin -> host -> plugin
1520 IPC_MESSAGE_CONTROL0(PpapiHostMsg_Graphics2D_Flush
)
1521 IPC_MESSAGE_CONTROL0(PpapiPluginMsg_Graphics2D_FlushAck
)
1523 IPC_MESSAGE_CONTROL2(PpapiHostMsg_Graphics2D_ReadImageData
,
1524 PP_Resource
/* image */,
1525 PP_Point
/* top_left */)
1526 IPC_MESSAGE_CONTROL0(PpapiPluginMsg_Graphics2D_ReadImageDataAck
)
1529 IPC_MESSAGE_CONTROL0(PpapiHostMsg_TrueTypeFontSingleton_Create
)
1530 IPC_MESSAGE_CONTROL0(PpapiHostMsg_TrueTypeFontSingleton_GetFontFamilies
)
1531 IPC_MESSAGE_CONTROL1(PpapiPluginMsg_TrueTypeFontSingleton_GetFontFamiliesReply
,
1532 std::vector
<std::string
> /* font_families */)
1533 IPC_MESSAGE_CONTROL1(PpapiHostMsg_TrueTypeFontSingleton_GetFontsInFamily
,
1534 std::string
/* family */)
1535 IPC_MESSAGE_CONTROL1(PpapiPluginMsg_TrueTypeFontSingleton_GetFontsInFamilyReply
,
1536 std::vector
<ppapi::proxy::SerializedTrueTypeFontDesc
>
1538 IPC_MESSAGE_CONTROL1(PpapiHostMsg_TrueTypeFont_Create
,
1539 ppapi::proxy::SerializedTrueTypeFontDesc
/* desc */)
1540 IPC_MESSAGE_CONTROL0(PpapiHostMsg_TrueTypeFont_Describe
)
1541 IPC_MESSAGE_CONTROL1(PpapiPluginMsg_TrueTypeFont_DescribeReply
,
1542 ppapi::proxy::SerializedTrueTypeFontDesc
/* desc */)
1543 IPC_MESSAGE_CONTROL0(PpapiHostMsg_TrueTypeFont_GetTableTags
)
1544 IPC_MESSAGE_CONTROL1(PpapiPluginMsg_TrueTypeFont_GetTableTagsReply
,
1545 std::vector
<uint32_t> /* tags */)
1546 IPC_MESSAGE_CONTROL3(PpapiHostMsg_TrueTypeFont_GetTable
,
1547 uint32_t /* table */,
1548 int32_t /* offset */,
1549 int32_t /* max_data_length */)
1550 IPC_MESSAGE_CONTROL1(PpapiPluginMsg_TrueTypeFont_GetTableReply
,
1551 std::string
/* data */)
1553 // Host Resolver ---------------------------------------------------------------
1554 // Creates a PPB_HostResolver resource.
1555 IPC_MESSAGE_CONTROL0(PpapiHostMsg_HostResolver_Create
)
1557 // Creates a PPB_HostResolver_Private resource.
1558 IPC_MESSAGE_CONTROL0(PpapiHostMsg_HostResolver_CreatePrivate
)
1560 // Resolves the given hostname.
1561 IPC_MESSAGE_CONTROL2(PpapiHostMsg_HostResolver_Resolve
,
1562 ppapi::HostPortPair
/* host_port */,
1563 PP_HostResolver_Private_Hint
/* hint */)
1565 // This message is a reply to HostResolver_Resolve. On success,
1566 // |canonical_name| contains the canonical name of the host; |net_address_list|
1567 // is a list of network addresses. On failure, both fields are set to empty.
1568 IPC_MESSAGE_CONTROL2(PpapiPluginMsg_HostResolver_ResolveReply
,
1569 std::string
/* canonical_name */,
1570 std::vector
<PP_NetAddress_Private
> /* net_address_list */)
1573 IPC_MESSAGE_CONTROL0(PpapiHostMsg_Printing_Create
)
1574 IPC_MESSAGE_CONTROL0(PpapiHostMsg_Printing_GetDefaultPrintSettings
)
1575 IPC_MESSAGE_CONTROL1(PpapiPluginMsg_Printing_GetDefaultPrintSettingsReply
,
1576 PP_PrintSettings_Dev
/* print_settings */)
1578 // UDP Socket ------------------------------------------------------------------
1579 // Creates a PPB_UDPSocket resource.
1580 IPC_MESSAGE_CONTROL0(PpapiHostMsg_UDPSocket_Create
)
1582 // Creates a PPB_UDPSocket_Private resource.
1583 IPC_MESSAGE_CONTROL0(PpapiHostMsg_UDPSocket_CreatePrivate
)
1585 IPC_MESSAGE_CONTROL2(PpapiHostMsg_UDPSocket_SetOption
,
1586 PP_UDPSocket_Option
/* name */,
1587 ppapi::SocketOptionData
/* value */)
1588 IPC_MESSAGE_CONTROL0(PpapiPluginMsg_UDPSocket_SetOptionReply
)
1589 IPC_MESSAGE_CONTROL1(PpapiHostMsg_UDPSocket_Bind
,
1590 PP_NetAddress_Private
/* net_addr */)
1591 IPC_MESSAGE_CONTROL1(PpapiPluginMsg_UDPSocket_BindReply
,
1592 PP_NetAddress_Private
/* bound_addr */)
1593 IPC_MESSAGE_CONTROL1(PpapiHostMsg_UDPSocket_RecvFrom
,
1594 int32_t /* num_bytes */)
1595 IPC_MESSAGE_CONTROL2(PpapiPluginMsg_UDPSocket_RecvFromReply
,
1596 std::string
/* data */,
1597 PP_NetAddress_Private
/* remote_addr */)
1598 IPC_MESSAGE_CONTROL2(PpapiHostMsg_UDPSocket_SendTo
,
1599 std::string
/* data */,
1600 PP_NetAddress_Private
/* net_addr */)
1601 IPC_MESSAGE_CONTROL1(PpapiPluginMsg_UDPSocket_SendToReply
,
1602 int32_t /* bytes_written */)
1603 IPC_MESSAGE_CONTROL0(PpapiHostMsg_UDPSocket_Close
)
1605 // URLLoader ------------------------------------------------------------------
1607 IPC_MESSAGE_CONTROL0(PpapiHostMsg_URLLoader_Create
)
1609 // These messages correspond to PPAPI calls and all should get a
1610 // CallbackComplete message.
1611 IPC_MESSAGE_CONTROL1(PpapiHostMsg_URLLoader_Open
,
1612 ppapi::URLRequestInfoData
/* request_data */)
1614 // The plugin can tell the host to defer a load to hold off on sending more
1615 // data because the buffer in the plugin is full. When defers_loading is set to
1616 // false, data streaming will resume.
1618 // When auditing redirects (no auto follow) the load will be automatically
1619 // deferred each time we get a redirect. The plugin will reset this to false
1620 // by sending this message when it wants to continue following the redirect.
1622 // When streaming data, the host may still send more data after this call (for
1623 // example, it could already be in-flight at the time of this request).
1624 IPC_MESSAGE_CONTROL1(PpapiHostMsg_URLLoader_SetDeferLoading
,
1625 bool /* defers_loading */)
1627 // Closes the URLLoader. There is no reply.
1628 IPC_MESSAGE_CONTROL0(PpapiHostMsg_URLLoader_Close
)
1630 // Requests that cross-site restrictions be ignored. The plugin must have
1631 // the private permission set. Otherwise this message will be ignored by the
1632 // renderer. There is no reply.
1633 IPC_MESSAGE_CONTROL0(PpapiHostMsg_URLLoader_GrantUniversalAccess
)
1635 // Push notification that a response is available.
1636 IPC_MESSAGE_CONTROL1(PpapiPluginMsg_URLLoader_ReceivedResponse
,
1637 ppapi::URLResponseInfoData
/* response */)
1639 // Push notification with load data from the renderer. It is a custom generated
1640 // message with the response data (array of bytes stored via WriteData)
1642 IPC_MESSAGE_CONTROL0(PpapiPluginMsg_URLLoader_SendData
)
1644 // Push notification indicating that all data has been sent, either via
1645 // SendData or by streaming it to a file. Note that since this is a push
1646 // notification, we don't use the result field of the ResourceMessageReply.
1647 IPC_MESSAGE_CONTROL1(PpapiPluginMsg_URLLoader_FinishedLoading
,
1648 int32_t /* result */)
1650 // Push notification from the renderer to the plugin to tell it about download
1651 // and upload progress. This will only be sent if the plugin has requested
1652 // progress updates, and only the fields requested by the plugin will be
1654 IPC_MESSAGE_CONTROL4(PpapiPluginMsg_URLLoader_UpdateProgress
,
1655 int64_t /* bytes_sent */,
1656 int64_t /* total_bytes_to_be_sent */,
1657 int64_t /* bytes_received */,
1658 int64_t /* total_bytes_to_be_received */)
1660 // Shared memory ---------------------------------------------------------------
1662 // Creates shared memory on the host side, returning a handle to the shared
1663 // memory on the plugin and keeping the memory mapped in on the host.
1664 // We return a "host handle_id" that can be mapped back to the
1665 // handle on the host side by PpapiGlobals::UntrackSharedMemoryHandle().
1666 IPC_SYNC_MESSAGE_CONTROL2_2(PpapiHostMsg_SharedMemory_CreateSharedMemory
,
1667 PP_Instance
/* instance */,
1668 uint32_t /* size */,
1669 int /* host_handle_id */,
1670 ppapi::proxy::SerializedHandle
/* plugin_handle */)
1672 // MediaStream -----------------------------------------------------------------
1674 // VideoDestination Private.
1675 IPC_MESSAGE_CONTROL0(PpapiHostMsg_VideoDestination_Create
)
1676 IPC_MESSAGE_CONTROL1(PpapiHostMsg_VideoDestination_Open
,
1677 std::string
/* stream_url */)
1678 IPC_MESSAGE_CONTROL0(PpapiPluginMsg_VideoDestination_OpenReply
)
1679 IPC_MESSAGE_CONTROL2(PpapiHostMsg_VideoDestination_PutFrame
,
1680 ppapi::HostResource
/* image_data */,
1681 PP_TimeTicks
/* timestamp */)
1682 IPC_MESSAGE_CONTROL0(PpapiHostMsg_VideoDestination_Close
)
1684 // VideoSource Private.
1685 IPC_MESSAGE_CONTROL0(PpapiHostMsg_VideoSource_Create
)
1686 IPC_MESSAGE_CONTROL1(PpapiHostMsg_VideoSource_Open
,
1687 std::string
/* stream_url */)
1688 IPC_MESSAGE_CONTROL0(PpapiPluginMsg_VideoSource_OpenReply
)
1689 IPC_MESSAGE_CONTROL0(PpapiHostMsg_VideoSource_GetFrame
)
1690 IPC_MESSAGE_CONTROL3(PpapiPluginMsg_VideoSource_GetFrameReply
,
1691 ppapi::HostResource
/* resource_id */,
1692 PP_ImageDataDesc
/* image_data_desc */,
1693 PP_TimeTicks
/* timestamp */)
1694 IPC_MESSAGE_CONTROL0(PpapiHostMsg_VideoSource_Close
)
1696 // WebSocket -------------------------------------------------------------------
1698 IPC_MESSAGE_CONTROL0(PpapiHostMsg_WebSocket_Create
)
1700 // Establishes the connection to a server. This message requires
1701 // WebSocket_ConnectReply as a reply message.
1702 IPC_MESSAGE_CONTROL2(PpapiHostMsg_WebSocket_Connect
,
1703 std::string
/* url */,
1704 std::vector
<std::string
> /* protocols */)
1706 // Closes established connection with graceful closing handshake. This message
1707 // requires WebSocket_CloseReply as a reply message.
1708 IPC_MESSAGE_CONTROL2(PpapiHostMsg_WebSocket_Close
,
1710 std::string
/* reason */)
1712 // Sends a text frame to the server. No reply is defined.
1713 IPC_MESSAGE_CONTROL1(PpapiHostMsg_WebSocket_SendText
,
1714 std::string
/* message */)
1716 // Sends a binary frame to the server. No reply is defined.
1717 IPC_MESSAGE_CONTROL1(PpapiHostMsg_WebSocket_SendBinary
,
1718 std::vector
<uint8_t> /* message */)
1720 // Fails the connection. This message invokes RFC6455 defined
1721 // _Fail the WebSocket Connection_ operation. No reply is defined.
1722 IPC_MESSAGE_CONTROL1(PpapiHostMsg_WebSocket_Fail
,
1723 std::string
/* message */)
1725 // This message is a reply to WebSocket_Connect. If the |url| and |protocols|
1726 // are invalid, WebSocket_ConnectReply is issued immediately and it contains
1727 // proper error code in its result. Otherwise, WebSocket_ConnectReply is sent
1728 // with valid |url|, |protocol|, and result PP_OK. |protocol| is not a passed
1729 // |protocols|, but a result of opening handshake negotiation. If the
1730 // connection can not be established successfully, WebSocket_ConnectReply is
1731 // not issued, but WebSocket_ClosedReply is sent instead.
1732 IPC_MESSAGE_CONTROL2(PpapiPluginMsg_WebSocket_ConnectReply
,
1733 std::string
/* url */,
1734 std::string
/* protocol */)
1736 // This message is a reply to WebSocket_Close. If the operation fails,
1737 // WebSocket_CloseReply is issued immediately and it contains PP_ERROR_FAILED.
1738 // Otherwise, CloseReply will be issued after the closing handshake is
1739 // finished. All arguments will be valid iff the result is PP_OK and it means
1740 // that the client initiated closing handshake is finished gracefully.
1741 IPC_MESSAGE_CONTROL4(PpapiPluginMsg_WebSocket_CloseReply
,
1742 uint64_t /* buffered_amount */,
1743 bool /* was_clean */,
1744 uint16_t /* code */,
1745 std::string
/* reason */)
1747 // Unsolicited reply message to transmit a receiving text frame.
1748 IPC_MESSAGE_CONTROL1(PpapiPluginMsg_WebSocket_ReceiveTextReply
,
1749 std::string
/* message */)
1751 // Unsolicited reply message to transmit a receiving binary frame.
1752 IPC_MESSAGE_CONTROL1(PpapiPluginMsg_WebSocket_ReceiveBinaryReply
,
1753 std::vector
<uint8_t> /* message */)
1755 // Unsolicited reply message to notify a error on underlying network connetion.
1756 IPC_MESSAGE_CONTROL0(PpapiPluginMsg_WebSocket_ErrorReply
)
1758 // Unsolicited reply message to update the buffered amount value.
1759 IPC_MESSAGE_CONTROL1(PpapiPluginMsg_WebSocket_BufferedAmountReply
,
1760 uint64_t /* buffered_amount */)
1762 // Unsolicited reply message to update |state| because of incoming external
1763 // events, e.g., protocol error, or unexpected network closure.
1764 IPC_MESSAGE_CONTROL1(PpapiPluginMsg_WebSocket_StateReply
,
1765 int32_t /* state */)
1767 // Unsolicited reply message to notify that the connection is closed without
1768 // any WebSocket_Close request. Server initiated closing handshake or
1769 // unexpected network errors will invoke this message.
1770 IPC_MESSAGE_CONTROL4(PpapiPluginMsg_WebSocket_ClosedReply
,
1771 uint64_t /* buffered_amount */,
1772 bool /* was_clean */,
1773 uint16_t /* code */,
1774 std::string
/* reason */)
1776 #if !defined(OS_NACL) && !defined(NACL_WIN64)
1779 IPC_MESSAGE_CONTROL0(PpapiHostMsg_AudioInput_Create
)
1780 IPC_MESSAGE_CONTROL3(PpapiHostMsg_AudioInput_Open
,
1781 std::string
/* device_id */,
1782 PP_AudioSampleRate
/* sample_rate */,
1783 uint32_t /* sample_frame_count */)
1784 // Reply to an Open call. This supplies a socket handle and a shared memory
1785 // handle. Both handles are passed in the ReplyParams struct.
1786 IPC_MESSAGE_CONTROL0(PpapiPluginMsg_AudioInput_OpenReply
)
1787 IPC_MESSAGE_CONTROL1(PpapiHostMsg_AudioInput_StartOrStop
, bool /* capture */)
1788 IPC_MESSAGE_CONTROL0(PpapiHostMsg_AudioInput_Close
)
1790 // BrowserFont -----------------------------------------------------------------
1792 IPC_MESSAGE_CONTROL0(PpapiHostMsg_BrowserFontSingleton_Create
)
1794 // Requests that the browser reply with the list of font families via
1795 // PpapiPluginMsg_BrowserFontSingleton_GetFontFamiliesReply.
1796 IPC_MESSAGE_CONTROL0(PpapiHostMsg_BrowserFontSingleton_GetFontFamilies
)
1798 // Reply to PpapiHostMsg_BrowserFontSingleton_GetFontFamilies with the font
1799 // family list. The |families| result is encoded by separating each family name
1800 // by a null character.
1801 IPC_MESSAGE_CONTROL1(PpapiPluginMsg_BrowserFontSingleton_GetFontFamiliesReply
,
1802 std::string
/* families */)
1804 // Flash -----------------------------------------------------------------------
1806 IPC_MESSAGE_CONTROL0(PpapiHostMsg_Flash_Create
)
1808 // Message to notify the browser to register an update in system activity.
1809 IPC_MESSAGE_CONTROL0(PpapiHostMsg_Flash_UpdateActivity
)
1811 // Query the browser for the proxy server to use for the given URL.
1812 IPC_MESSAGE_CONTROL1(PpapiHostMsg_Flash_GetProxyForURL
, std::string
/* url */)
1813 // Reply message for GetProxyForURL containing the proxy server.
1814 IPC_MESSAGE_CONTROL1(PpapiPluginMsg_Flash_GetProxyForURLReply
,
1815 std::string
/* proxy */)
1817 // Queries the browser for the local time zone offset for a given time.
1818 IPC_MESSAGE_CONTROL1(PpapiHostMsg_Flash_GetLocalTimeZoneOffset
,
1819 base::Time
/* time */)
1820 // Reply to GetLocalTimeZoneOffset containing the time zone offset as a double.
1821 IPC_MESSAGE_CONTROL1(PpapiPluginMsg_Flash_GetLocalTimeZoneOffsetReply
,
1822 double /* offset */)
1824 // Query the browser for the restrictions on storing Flash LSOs.
1825 IPC_MESSAGE_CONTROL0(PpapiHostMsg_Flash_GetLocalDataRestrictions
)
1826 // Reply message for GetLocalDataRestrictions containing the restrictions to
1827 // use. These are PP_FlashLSORestrictions cast to an int32_t.
1828 IPC_MESSAGE_CONTROL1(PpapiPluginMsg_Flash_GetLocalDataRestrictionsReply
,
1829 int32_t /* restrictions */)
1831 // Notifies the renderer whether the Flash instance is in windowed mode. No
1833 IPC_MESSAGE_CONTROL1(PpapiHostMsg_Flash_SetInstanceAlwaysOnTop
,
1836 // Notifies the renderer to draw text to the given PP_ImageData resource. All
1837 // parmeters for drawing (including the resource to draw to) are contianed in
1838 // the PPBFlash_DrawGlyphs_Params structure. An error code is sent in a reply
1839 // message indicating success.
1840 IPC_MESSAGE_CONTROL1(PpapiHostMsg_Flash_DrawGlyphs
,
1841 ppapi::proxy::PPBFlash_DrawGlyphs_Params
/* params */)
1843 // Notifies the renderer to navigate to the given URL contained in the
1844 // URLRequestInfoData. An error code is sent in a reply message indicating
1846 IPC_MESSAGE_CONTROL3(PpapiHostMsg_Flash_Navigate
,
1847 ppapi::URLRequestInfoData
/* data */,
1848 std::string
/* target */,
1849 bool /* from_user_action */)
1851 // Queries the renderer on whether the plugin instance is the topmost element
1852 // in the area of the instance specified by the given PP_Rect. PP_OK is sent as
1853 // the error code in a reply message if the rect is topmost otherwise
1854 // PP_ERROR_FAILED is sent.
1855 IPC_MESSAGE_CONTROL1(PpapiHostMsg_Flash_IsRectTopmost
,
1858 // Notifies the renderer to invoke printing for the given plugin instance. No
1860 IPC_MESSAGE_CONTROL0(PpapiHostMsg_Flash_InvokePrinting
)
1862 // DeviceEnumeration -----------------------------------------------------------
1863 // Device enumeration messages used by audio input and video capture.
1864 IPC_MESSAGE_CONTROL0(PpapiHostMsg_DeviceEnumeration_EnumerateDevices
)
1865 IPC_MESSAGE_CONTROL1(PpapiPluginMsg_DeviceEnumeration_EnumerateDevicesReply
,
1866 std::vector
<ppapi::DeviceRefData
> /* devices */)
1867 IPC_MESSAGE_CONTROL1(PpapiHostMsg_DeviceEnumeration_MonitorDeviceChange
,
1868 uint32_t /* callback_id */)
1869 IPC_MESSAGE_CONTROL0(PpapiHostMsg_DeviceEnumeration_StopMonitoringDeviceChange
)
1870 IPC_MESSAGE_CONTROL2(PpapiPluginMsg_DeviceEnumeration_NotifyDeviceChange
,
1871 uint32_t /* callback_id */,
1872 std::vector
<ppapi::DeviceRefData
> /* devices */)
1875 IPC_MESSAGE_CONTROL0(PpapiHostMsg_FlashClipboard_Create
)
1876 IPC_MESSAGE_CONTROL1(PpapiHostMsg_FlashClipboard_RegisterCustomFormat
,
1877 std::string
/* format_name */)
1878 IPC_MESSAGE_CONTROL1(PpapiPluginMsg_FlashClipboard_RegisterCustomFormatReply
,
1879 uint32_t /* format */)
1880 IPC_MESSAGE_CONTROL2(PpapiHostMsg_FlashClipboard_IsFormatAvailable
,
1881 uint32_t /* clipboard_type */,
1882 uint32_t /* format */)
1883 IPC_MESSAGE_CONTROL2(PpapiHostMsg_FlashClipboard_ReadData
,
1884 uint32_t /* clipboard_type */,
1885 uint32_t /* format */)
1886 IPC_MESSAGE_CONTROL1(PpapiPluginMsg_FlashClipboard_ReadDataReply
,
1887 std::string
/* result */)
1888 IPC_MESSAGE_CONTROL3(PpapiHostMsg_FlashClipboard_WriteData
,
1889 uint32_t /* clipboard_type */,
1890 std::vector
<uint32_t> /* formats */,
1891 std::vector
<std::string
> /* data */)
1894 IPC_MESSAGE_CONTROL0(PpapiHostMsg_FlashFile_Create
)
1895 IPC_MESSAGE_CONTROL2(PpapiHostMsg_FlashFile_OpenFile
,
1896 ppapi::PepperFilePath
/* path */,
1898 IPC_MESSAGE_CONTROL2(PpapiHostMsg_FlashFile_RenameFile
,
1899 ppapi::PepperFilePath
/* from_path */,
1900 ppapi::PepperFilePath
/* to_path */)
1901 IPC_MESSAGE_CONTROL2(PpapiHostMsg_FlashFile_DeleteFileOrDir
,
1902 ppapi::PepperFilePath
/* path */,
1903 bool /* recursive */)
1904 IPC_MESSAGE_CONTROL1(PpapiHostMsg_FlashFile_CreateDir
,
1905 ppapi::PepperFilePath
/* path */)
1906 IPC_MESSAGE_CONTROL1(PpapiHostMsg_FlashFile_QueryFile
,
1907 ppapi::PepperFilePath
/* path */)
1908 IPC_MESSAGE_CONTROL1(PpapiPluginMsg_FlashFile_QueryFileReply
,
1909 base::PlatformFileInfo
/* file_info */)
1910 IPC_MESSAGE_CONTROL1(PpapiHostMsg_FlashFile_GetDirContents
,
1911 ppapi::PepperFilePath
/* path */)
1912 IPC_MESSAGE_CONTROL1(PpapiPluginMsg_FlashFile_GetDirContentsReply
,
1913 ppapi::DirContents
/* entries */)
1914 IPC_MESSAGE_CONTROL0(PpapiHostMsg_FlashFile_CreateTemporaryFile
)
1917 IPC_MESSAGE_CONTROL2(PpapiHostMsg_FlashFontFile_Create
,
1918 ppapi::proxy::SerializedFontDescription
/* description */,
1919 PP_PrivateFontCharset
/* charset */)
1920 IPC_MESSAGE_CONTROL1(PpapiHostMsg_FlashFontFile_GetFontTable
,
1921 uint32_t /* table */)
1922 IPC_MESSAGE_CONTROL1(PpapiPluginMsg_FlashFontFile_GetFontTableReply
,
1923 std::string
/* output */)
1925 // Flash fullscreen.
1926 IPC_MESSAGE_CONTROL0(PpapiHostMsg_FlashFullscreen_Create
)
1927 IPC_MESSAGE_CONTROL1(PpapiHostMsg_FlashFullscreen_SetFullscreen
,
1928 bool /* fullscreen */)
1930 // FlashMenu ------------------------------------------------------------------
1932 // Creates the flash menu with the given data.
1933 IPC_MESSAGE_CONTROL1(PpapiHostMsg_FlashMenu_Create
,
1934 ppapi::proxy::SerializedFlashMenu
/* menu_data */)
1936 // Shows the menu at the given location relative to the plugin instance.
1937 IPC_MESSAGE_CONTROL1(PpapiHostMsg_FlashMenu_Show
,
1938 PP_Point
/* location */)
1940 // Reply to a show command. If the resource reply is PP_OK, the selected_id
1941 // will be the menu item ID chosen by the user.
1942 IPC_MESSAGE_CONTROL1(PpapiPluginMsg_FlashMenu_ShowReply
,
1943 int32_t /* selected_id */)
1945 // PDF ------------------------------------------------------------------------
1947 // Creates the PDF resource.
1948 IPC_MESSAGE_CONTROL0(PpapiHostMsg_PDF_Create
)
1950 // Requests the localized string for the given ID.
1951 IPC_MESSAGE_CONTROL1(PpapiHostMsg_PDF_GetLocalizedString
,
1952 PP_ResourceString
/* string_id */)
1953 // Reply for PpapiHostMsg_PDF_GetLocalizedString containing the localized
1955 IPC_MESSAGE_CONTROL1(PpapiPluginMsg_PDF_GetLocalizedStringReply
,
1956 std::string
/* localized_string*/)
1958 // Notifies the renderer that the PDF started loading.
1959 IPC_MESSAGE_CONTROL0(PpapiHostMsg_PDF_DidStartLoading
)
1961 // Notifies the renderer that the PDF stopped loading.
1962 IPC_MESSAGE_CONTROL0(PpapiHostMsg_PDF_DidStopLoading
)
1964 // Sets any restrictions on the PDF content.
1965 IPC_MESSAGE_CONTROL1(PpapiHostMsg_PDF_SetContentRestriction
,
1966 int /* restrictions */)
1968 // Requests that the specified action be recorded with UMA.
1969 IPC_MESSAGE_CONTROL1(PpapiHostMsg_PDF_UserMetricsRecordAction
,
1970 std::string
/* action */)
1972 // Notifies the renderer that the current PDF uses an unsupported feature.
1973 IPC_MESSAGE_CONTROL0(PpapiHostMsg_PDF_HasUnsupportedFeature
)
1975 // Notifies the renderer to print the current PDF.
1976 IPC_MESSAGE_CONTROL0(PpapiHostMsg_PDF_Print
)
1978 // Notifies the renderer to save the current PDF.
1979 IPC_MESSAGE_CONTROL0(PpapiHostMsg_PDF_SaveAs
)
1981 // Requests a resource image for the plugin at a particular scale.
1982 IPC_MESSAGE_CONTROL2(PpapiHostMsg_PDF_GetResourceImage
,
1983 PP_ResourceImage
/* image_id */,
1986 // Reply for PpapiHostMsg_PDF_GetResourceImage containing the host resource id
1987 // of the image and a PP_ImageDataDesc which describes the image. Also carries
1988 // a shared memory handle pointing to the memory containg the image.
1989 IPC_MESSAGE_CONTROL2(PpapiPluginMsg_PDF_GetResourceImageReply
,
1990 ppapi::HostResource
/* resource_id */,
1991 PP_ImageDataDesc
/* image_data_desc */)
1993 // VideoCapture_Dev, plugin -> host
1994 IPC_MESSAGE_CONTROL0(PpapiHostMsg_VideoCapture_Create
)
1995 IPC_MESSAGE_CONTROL0(PpapiHostMsg_VideoCapture_StartCapture
)
1996 IPC_MESSAGE_CONTROL1(PpapiHostMsg_VideoCapture_ReuseBuffer
,
1997 uint32_t /* buffer */)
1998 IPC_MESSAGE_CONTROL0(PpapiHostMsg_VideoCapture_StopCapture
)
1999 IPC_MESSAGE_CONTROL0(PpapiHostMsg_VideoCapture_Close
)
2001 // VideoCapture_Dev, plugin -> host -> plugin
2002 IPC_MESSAGE_CONTROL3(PpapiHostMsg_VideoCapture_Open
,
2003 std::string
/* device_id */,
2004 PP_VideoCaptureDeviceInfo_Dev
/* requested_info */,
2005 uint32_t /* buffer_count */)
2006 IPC_MESSAGE_CONTROL0(PpapiPluginMsg_VideoCapture_OpenReply
)
2008 // VideoCapture_Dev, host -> plugin
2009 IPC_MESSAGE_CONTROL3(PpapiPluginMsg_VideoCapture_OnDeviceInfo
,
2010 PP_VideoCaptureDeviceInfo_Dev
/* info */,
2011 std::vector
<ppapi::HostResource
> /* buffers */,
2012 uint32_t /* buffer_size */)
2013 IPC_MESSAGE_CONTROL1(PpapiPluginMsg_VideoCapture_OnStatus
,
2014 uint32_t /* status */)
2015 IPC_MESSAGE_CONTROL1(PpapiPluginMsg_VideoCapture_OnError
,
2016 uint32_t /* error */)
2017 IPC_MESSAGE_CONTROL1(PpapiPluginMsg_VideoCapture_OnBufferReady
,
2018 uint32_t /* buffer */)
2020 // Talk ------------------------------------------------------------------------
2022 IPC_MESSAGE_CONTROL0(PpapiHostMsg_Talk_Create
)
2023 IPC_MESSAGE_CONTROL1(PpapiHostMsg_Talk_RequestPermission
,
2024 PP_TalkPermission
/* permission */)
2025 IPC_MESSAGE_CONTROL0(PpapiPluginMsg_Talk_RequestPermissionReply
)
2026 IPC_MESSAGE_CONTROL0(PpapiHostMsg_Talk_StartRemoting
)
2027 IPC_MESSAGE_CONTROL0(PpapiPluginMsg_Talk_StartRemotingReply
)
2028 IPC_MESSAGE_CONTROL0(PpapiHostMsg_Talk_StopRemoting
)
2029 IPC_MESSAGE_CONTROL0(PpapiPluginMsg_Talk_StopRemotingReply
)
2030 IPC_MESSAGE_CONTROL1(PpapiPluginMsg_Talk_NotifyEvent
, PP_TalkEvent
/* event */)
2032 #endif // !defined(OS_NACL) && !defined(NACL_WIN64)