summaryrefslogtreecommitdiffstats
path: root/ppapi/proxy/ppapi_messages_internal.h
blob: f99f4cc4cd2d33fbe7b29738728467c0b4e88e1a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
// Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

// This header is meant to be included in multiple passes, hence no traditional
// header guard. It is included by backing_store_messages_internal.h
// See ipc_message_macros.h for explanation of the macros and passes.

// This file needs to be included again, even though we're actually included
// from it via utility_messages.h.
#include "ipc/ipc_message_macros.h"

// These are from the plugin to the renderer
IPC_BEGIN_MESSAGES(Ppapi)
  // Loads the given plugin.
  IPC_MESSAGE_CONTROL2(PpapiMsg_LoadPlugin,
                       FilePath /* path */,
                       int /* renderer_id */)

  IPC_SYNC_MESSAGE_CONTROL1_1(PpapiMsg_InitializeModule,
                              PP_Module /* module_id */,
                              bool /* result */)

  // Sent in both directions to see if the other side supports the given
  // interface.
  IPC_SYNC_MESSAGE_CONTROL1_1(PpapiMsg_SupportsInterface,
                              std::string /* interface_name */,
                              bool /* result */)

  // Way for the renderer to list all interfaces that is supports in advance to
  // avoid extra IPC traffic.
  IPC_MESSAGE_CONTROL1(PpapiMsg_DeclareInterfaces,
                       std::vector<std::string> /* interfaces */)

  IPC_MESSAGE_CONTROL2(PpapiMsg_ExecuteCallback,
                       uint32 /* serialized_callback */,
                       int32 /* param */)

  // PPP_Class.
  IPC_SYNC_MESSAGE_ROUTED3_2(PpapiMsg_PPPClass_HasProperty,
                             int64 /* ppp_class */,
                             int64 /* object */,
                             pp::proxy::SerializedVar /* property */,
                             pp::proxy::SerializedVar /* out_exception */,
                             bool /* result */)
  IPC_SYNC_MESSAGE_ROUTED3_2(PpapiMsg_PPPClass_HasMethod,
                             int64 /* ppp_class */,
                             int64 /* object */,
                             pp::proxy::SerializedVar /* method */,
                             pp::proxy::SerializedVar /* out_exception */,
                             bool /* result */)
  IPC_SYNC_MESSAGE_ROUTED3_2(PpapiMsg_PPPClass_GetProperty,
                             int64 /* ppp_class */,
                             int64 /* object */,
                             pp::proxy::SerializedVar /* property */,
                             pp::proxy::SerializedVar /* out_exception */,
                             pp::proxy::SerializedVar /* result */)
  IPC_SYNC_MESSAGE_ROUTED2_2(PpapiMsg_PPPClass_EnumerateProperties,
                             int64 /* ppp_class */,
                             int64 /* object */,
                             std::vector<pp::proxy::SerializedVar> /* props */,
                             pp::proxy::SerializedVar /* out_exception */)
  IPC_SYNC_MESSAGE_ROUTED4_1(PpapiMsg_PPPClass_SetProperty,
                             int64 /* ppp_class */,
                             int64 /* object */,
                             pp::proxy::SerializedVar /* name */,
                             pp::proxy::SerializedVar /* value */,
                             pp::proxy::SerializedVar /* out_exception */)
  IPC_SYNC_MESSAGE_ROUTED3_1(PpapiMsg_PPPClass_RemoveProperty,
                             int64 /* ppp_class */,
                             int64 /* object */,
                             pp::proxy::SerializedVar /* property */,
                             pp::proxy::SerializedVar /* out_exception */)
  IPC_SYNC_MESSAGE_ROUTED4_2(PpapiMsg_PPPClass_Call,
                             int64 /* ppp_class */,
                             int64 /* object */,
                             pp::proxy::SerializedVar /* method_name */,
                             std::vector<pp::proxy::SerializedVar> /* args */,
                             pp::proxy::SerializedVar /* out_exception */,
                             pp::proxy::SerializedVar /* result */)
  IPC_SYNC_MESSAGE_ROUTED3_2(PpapiMsg_PPPClass_Construct,
                             int64 /* ppp_class */,
                             int64 /* object */,
                             std::vector<pp::proxy::SerializedVar> /* args */,
                             pp::proxy::SerializedVar /* out_exception */,
                             pp::proxy::SerializedVar /* result */)
  IPC_MESSAGE_ROUTED2(PpapiMsg_PPPClass_Deallocate,
                      int64 /* ppp_class */,
                      int64 /* object */)

  // PPP_Instance.
  IPC_SYNC_MESSAGE_ROUTED3_1(PpapiMsg_PPPInstance_DidCreate,
                             PP_Instance /* instance */,
                             std::vector<std::string> /* argn */,
                             std::vector<std::string> /* argv */,
                             bool /* result */)
  IPC_MESSAGE_ROUTED1(PpapiMsg_PPPInstance_DidDestroy,
                      PP_Instance /* instance */)
  IPC_MESSAGE_ROUTED3(PpapiMsg_PPPInstance_DidChangeView,
                      PP_Instance /* instance */,
                      PP_Rect /* position */,
                      PP_Rect /* clip */)
  IPC_MESSAGE_ROUTED2(PpapiMsg_PPPInstance_DidChangeFocus,
                      PP_Instance /* instance */,
                      bool /* has_focus */)
  IPC_SYNC_MESSAGE_ROUTED2_1(PpapiMsg_PPPInstance_HandleInputEvent,
                             PP_Instance /* instance */,
                             PP_InputEvent /* event */,
                             bool /* result */)
  IPC_SYNC_MESSAGE_ROUTED2_1(PpapiMsg_PPPInstance_HandleDocumentLoad,
                             PP_Instance /* instance */,
                             PP_Resource /* url_loader */,
                             bool /* result */)
  IPC_SYNC_MESSAGE_ROUTED1_1(PpapiMsg_PPPInstance_GetInstanceObject,
                             PP_Instance /* instance */,
                             pp::proxy::SerializedVar /* result */)


  // PPB_URLLoader
  // (Messages from browser to plugin to notify it of changes in state.)
  IPC_MESSAGE_ROUTED5(PpapiMsg_PPBURLLoader_UpdateProgress,
                      PP_Resource /* resource */,
                      int64 /* bytes_sent */,
                      int64 /* total_bytes_to_be_sent */,
                      int64 /* bytes_received */,
                      int64 /* total_bytes_to_be_received */)
IPC_END_MESSAGES(Ppapi)

// -----------------------------------------------------------------------------
// These are from the plugin to the renderer.
IPC_BEGIN_MESSAGES(PpapiHost)
  // Reply to PpapiMsg_LoadPlugin.
  IPC_MESSAGE_CONTROL1(PpapiHostMsg_PluginLoaded,
                       IPC::ChannelHandle /* handle */)

  // PPB_Core.
  IPC_MESSAGE_ROUTED1(PpapiHostMsg_PPBCore_AddRefResource, PP_Resource)
  IPC_MESSAGE_ROUTED1(PpapiHostMsg_PPBCore_ReleaseResource, PP_Resource)
  IPC_SYNC_MESSAGE_ROUTED0_1(PpapiHostMsg_PPBCore_GetTime,
                             double /* return value -> time */)
  IPC_SYNC_MESSAGE_ROUTED0_1(PpapiHostMsg_PPBCore_GetTimeTicks,
                             double /* return value -> time */)
  IPC_MESSAGE_ROUTED3(PpapiHostMsg_PPBCore_CallOnMainThread,
                      int /* delay_in_msec */,
                      uint32_t /* serialized_callback */,
                      int32_t /* result */)

  // PPB_Graphics2D.
  IPC_SYNC_MESSAGE_ROUTED3_1(PpapiHostMsg_PPBGraphics2D_Create,
                             PP_Module /* module */,
                             PP_Size /* size */,
                             bool /* is_always_opaque */,
                             PP_Resource /* result */)
  IPC_MESSAGE_ROUTED5(PpapiHostMsg_PPBGraphics2D_PaintImageData,
                      PP_Resource /* graphics_2d */,
                      PP_Resource /* image_data */,
                      PP_Point /* top_left */,
                      bool /* src_rect_specified */,
                      PP_Rect /* src_rect */)
  IPC_MESSAGE_ROUTED4(PpapiHostMsg_PPBGraphics2D_Scroll,
                      PP_Resource /* graphics_2d */,
                      bool /* clip_specified */,
                      PP_Rect /* clip */,
                      PP_Point /* amount */)
  IPC_MESSAGE_ROUTED2(PpapiHostMsg_PPBGraphics2D_ReplaceContents,
                      PP_Resource /* graphics_2d */,
                      PP_Resource /* image_data */)
  IPC_SYNC_MESSAGE_ROUTED2_1(PpapiHostMsg_PPBGraphics2D_Flush,
                             PP_Resource /* graphics_2d */,
                             uint32_t /* serialized_callback */,
                             int32_t /* result */)

  // PPB_ImageData.
  IPC_SYNC_MESSAGE_ROUTED0_1(
      PpapiHostMsg_PPBImageData_GetNativeImageDataFormat,
      int32 /* result_format */)
  IPC_SYNC_MESSAGE_ROUTED1_1(
      PpapiHostMsg_PPBImageData_IsImageDataFormatSupported,
      int32 /* format */,
      bool /* result */)
  IPC_SYNC_MESSAGE_ROUTED4_3(PpapiHostMsg_PPBImageData_Create,
                             PP_Module /* module */,
                             int32 /* format */,
                             PP_Size /* size */,
                             bool /* init_to_zero */,
                             PP_Resource /* result_resource */,
                             std::string /* image_data_desc */,
                             uint64_t /* result_shm_handle */)

  // PPB_Instance.
  IPC_SYNC_MESSAGE_ROUTED1_1(PpapiHostMsg_PPBInstance_GetWindowObject,
                             PP_Instance /* instance */,
                             pp::proxy::SerializedVar /* result */)
  IPC_SYNC_MESSAGE_ROUTED1_1(PpapiHostMsg_PPBInstance_GetOwnerElementObject,
                             PP_Instance /* instance */,
                             pp::proxy::SerializedVar /* result */)
  IPC_SYNC_MESSAGE_ROUTED2_1(PpapiHostMsg_PPBInstance_BindGraphics,
                             PP_Instance /* instance */,
                             PP_Resource /* device */,
                             bool /* result */)
  IPC_SYNC_MESSAGE_ROUTED1_1(PpapiHostMsg_PPBInstance_IsFullFrame,
                             PP_Instance /* instance */,
                             bool /* result */)
  IPC_SYNC_MESSAGE_ROUTED2_2(PpapiHostMsg_PPBInstance_ExecuteScript,
                             PP_Instance /* instance */,
                             pp::proxy::SerializedVar /* script */,
                             pp::proxy::SerializedVar /* out_exception */,
                             pp::proxy::SerializedVar /* result */)

  // PPB_URLLoader.
  IPC_SYNC_MESSAGE_ROUTED1_1(PpapiHostMsg_PPBURLLoader_Create,
                             PP_Instance /* instance */,
                             PP_Resource /* result */)
  IPC_MESSAGE_ROUTED3(PpapiHostMsg_PPBURLLoader_Open,
                      PP_Resource /* loader */,
                      PP_Resource /*request_info */,
                      uint32_t /* serialized_callback */)
  IPC_MESSAGE_ROUTED2(PpapiHostMsg_PPBURLLoader_FollowRedirect,
                      PP_Resource /* loader */,
                      uint32_t /* serialized_callback */)
  IPC_SYNC_MESSAGE_ROUTED1_3(PpapiHostMsg_PPBURLLoader_GetUploadProgress,
                             PP_Resource /* loader */,
                             int64 /* bytes_sent */,
                             int64 /* total_bytes_to_be_sent */,
                             bool /* result */)
  IPC_SYNC_MESSAGE_ROUTED1_3(PpapiHostMsg_PPBURLLoader_GetDownloadProgress,
                             PP_Resource /* loader */,
                             int64 /* bytes_received */,
                             int64 /* total_bytes_to_be_received */,
                             bool /* result */)
  IPC_SYNC_MESSAGE_ROUTED1_1(PpapiHostMsg_PPBURLLoader_GetResponseInfo,
                             PP_Resource /* loader */,
                             PP_Resource /* response_info_out */)
  IPC_MESSAGE_ROUTED3(PpapiHostMsg_PPBURLLoader_ReadResponseBody,
                      PP_Resource /* loader */,
                      int32_t /* bytes_to_read */,
                      uint32_t /* serialized_callback */)
  IPC_MESSAGE_ROUTED2(PpapiHostMsg_PPBURLLoader_FinishStreamingToFile,
                      PP_Resource /* loader */,
                      uint32_t /* serialized_callback */)
  IPC_MESSAGE_ROUTED1(PpapiHostMsg_PPBURLLoader_Close,
                      PP_Resource /* loader */)

  // PPB_Var.
  IPC_MESSAGE_ROUTED1(PpapiHostMsg_PPBVar_AddRefObject,
                      int64 /* object_id */)
  IPC_MESSAGE_ROUTED1(PpapiHostMsg_PPBVar_ReleaseObject,
                      int64 /* object_id */)
  IPC_SYNC_MESSAGE_ROUTED3_2(PpapiHostMsg_PPBVar_ConvertType,
                             PP_Instance /* instance */,
                             pp::proxy::SerializedVar /* var */,
                             int /* new_type */,
                             pp::proxy::SerializedVar /* exception */,
                             pp::proxy::SerializedVar /* result */)
  IPC_MESSAGE_ROUTED3(PpapiHostMsg_PPBVar_DefineProperty,
                      pp::proxy::SerializedVar /* object */,
                      PP_ObjectProperty /* property */,
                      pp::proxy::SerializedVar /* out_exception */)
  IPC_SYNC_MESSAGE_ROUTED2_2(PpapiHostMsg_PPBVar_HasProperty,
                             pp::proxy::SerializedVar /* object */,
                             pp::proxy::SerializedVar /* property */,
                             pp::proxy::SerializedVar /* out_exception */,
                             bool /* result */)
  IPC_SYNC_MESSAGE_ROUTED2_2(PpapiHostMsg_PPBVar_HasMethodDeprecated,
                             pp::proxy::SerializedVar /* object */,
                             pp::proxy::SerializedVar /* method */,
                             pp::proxy::SerializedVar /* out_exception */,
                             bool /* result */)
  IPC_SYNC_MESSAGE_ROUTED2_2(PpapiHostMsg_PPBVar_GetProperty,
                             pp::proxy::SerializedVar /* object */,
                             pp::proxy::SerializedVar /* property */,
                             pp::proxy::SerializedVar /* out_exception */,
                             pp::proxy::SerializedVar /* result */)
  IPC_SYNC_MESSAGE_ROUTED2_2(PpapiHostMsg_PPBVar_DeleteProperty,
                             pp::proxy::SerializedVar /* object */,
                             pp::proxy::SerializedVar /* property */,
                             pp::proxy::SerializedVar /* out_exception */,
                             bool /* result */)
  IPC_SYNC_MESSAGE_ROUTED1_2(PpapiHostMsg_PPBVar_EnumerateProperties,
                             pp::proxy::SerializedVar /* object */,
                             std::vector<pp::proxy::SerializedVar> /* props */,
                             pp::proxy::SerializedVar /* out_exception */)
  IPC_SYNC_MESSAGE_ROUTED3_1(PpapiHostMsg_PPBVar_SetPropertyDeprecated,
                             pp::proxy::SerializedVar /* object */,
                             pp::proxy::SerializedVar /* name */,
                             pp::proxy::SerializedVar /* value */,
                             pp::proxy::SerializedVar /* out_exception */)
  IPC_SYNC_MESSAGE_ROUTED1_1(PpapiHostMsg_PPBVar_IsCallable,
                             pp::proxy::SerializedVar /* object */,
                             bool /* result */)
  IPC_SYNC_MESSAGE_ROUTED4_2(PpapiHostMsg_PPBVar_Call,
                             pp::proxy::SerializedVar /* object */,
                             pp::proxy::SerializedVar /* this_object */,
                             pp::proxy::SerializedVar /* method_name */,
                             std::vector<pp::proxy::SerializedVar> /* args */,
                             pp::proxy::SerializedVar /* out_exception */,
                             pp::proxy::SerializedVar /* result */)
  IPC_SYNC_MESSAGE_ROUTED3_2(PpapiHostMsg_PPBVar_CallDeprecated,
                             pp::proxy::SerializedVar /* object */,
                             pp::proxy::SerializedVar /* method_name */,
                             std::vector<pp::proxy::SerializedVar> /* args */,
                             pp::proxy::SerializedVar /* out_exception */,
                             pp::proxy::SerializedVar /* result */)
  IPC_SYNC_MESSAGE_ROUTED2_2(PpapiHostMsg_PPBVar_Construct,
                             pp::proxy::SerializedVar /* object */,
                             std::vector<pp::proxy::SerializedVar> /* args */,
                             pp::proxy::SerializedVar /* out_exception */,
                             pp::proxy::SerializedVar /* result */)
  IPC_SYNC_MESSAGE_ROUTED2_2(PpapiHostMsg_PPBVar_IsInstanceOfDeprecated,
                             pp::proxy::SerializedVar /* var */,
                             int64 /* object_class */,
                             int64 /* object-data */,
                             bool /* result */)
  IPC_SYNC_MESSAGE_ROUTED3_1(PpapiHostMsg_PPBVar_CreateObjectDeprecated,
                             PP_Module /* module */,
                             int64 /* object_class */,
                             int64 /* object_data */,
                             pp::proxy::SerializedVar /* result */)

IPC_END_MESSAGES(PpapiHost)