OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // Multiply-included message header, no traditional include guard. | 5 // Multiply-included message header, no traditional include guard. |
6 #include <string> | 6 #include <string> |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "base/file_path.h" | 10 #include "base/file_path.h" |
11 #include "base/process.h" | 11 #include "base/process.h" |
12 #include "base/shared_memory.h" | 12 #include "base/shared_memory.h" |
13 #include "base/string16.h" | 13 #include "base/string16.h" |
14 #include "base/sync_socket.h" | 14 #include "base/sync_socket.h" |
15 #include "gpu/command_buffer/common/command_buffer.h" | 15 #include "gpu/command_buffer/common/command_buffer.h" |
16 #include "gpu/ipc/gpu_command_buffer_traits.h" | 16 #include "gpu/ipc/gpu_command_buffer_traits.h" |
17 #include "ipc/ipc_channel_handle.h" | 17 #include "ipc/ipc_channel_handle.h" |
18 #include "ipc/ipc_message_macros.h" | 18 #include "ipc/ipc_message_macros.h" |
19 #include "ipc/ipc_message_utils.h" | 19 #include "ipc/ipc_message_utils.h" |
20 #include "ipc/ipc_platform_file.h" | 20 #include "ipc/ipc_platform_file.h" |
21 #include "ppapi/c/pp_bool.h" | 21 #include "ppapi/c/pp_bool.h" |
22 #include "ppapi/c/pp_file_info.h" | 22 #include "ppapi/c/pp_file_info.h" |
23 #include "ppapi/c/pp_instance.h" | 23 #include "ppapi/c/pp_instance.h" |
24 #include "ppapi/c/pp_module.h" | 24 #include "ppapi/c/pp_module.h" |
25 #include "ppapi/c/pp_point.h" | 25 #include "ppapi/c/pp_point.h" |
26 #include "ppapi/c/pp_rect.h" | 26 #include "ppapi/c/pp_rect.h" |
27 #include "ppapi/c/pp_resource.h" | 27 #include "ppapi/c/pp_resource.h" |
28 #include "ppapi/c/pp_size.h" | 28 #include "ppapi/c/pp_size.h" |
| 29 #include "ppapi/c/dev/pp_video_dev.h" |
29 #include "ppapi/c/private/ppb_flash_tcp_socket.h" | 30 #include "ppapi/c/private/ppb_flash_tcp_socket.h" |
30 #include "ppapi/proxy/ppapi_param_traits.h" | 31 #include "ppapi/proxy/ppapi_param_traits.h" |
31 #include "ppapi/proxy/serialized_flash_menu.h" | 32 #include "ppapi/proxy/serialized_flash_menu.h" |
32 #include "ppapi/proxy/serialized_structs.h" | 33 #include "ppapi/proxy/serialized_structs.h" |
33 #include "ppapi/shared_impl/input_event_impl.h" | 34 #include "ppapi/shared_impl/input_event_impl.h" |
34 #include "ppapi/shared_impl/ppapi_preferences.h" | 35 #include "ppapi/shared_impl/ppapi_preferences.h" |
35 | 36 |
36 #define IPC_MESSAGE_START PpapiMsgStart | 37 #define IPC_MESSAGE_START PpapiMsgStart |
37 | 38 |
38 IPC_ENUM_TRAITS(PP_InputEvent_Type) | 39 IPC_ENUM_TRAITS(PP_InputEvent_Type) |
39 IPC_ENUM_TRAITS(PP_InputEvent_MouseButton) | 40 IPC_ENUM_TRAITS(PP_InputEvent_MouseButton) |
| 41 IPC_ENUM_TRAITS(PP_VideoDecodeError_Dev) |
40 | 42 |
41 IPC_STRUCT_TRAITS_BEGIN(PP_Point) | 43 IPC_STRUCT_TRAITS_BEGIN(PP_Point) |
42 IPC_STRUCT_TRAITS_MEMBER(x) | 44 IPC_STRUCT_TRAITS_MEMBER(x) |
43 IPC_STRUCT_TRAITS_MEMBER(y) | 45 IPC_STRUCT_TRAITS_MEMBER(y) |
44 IPC_STRUCT_TRAITS_END() | 46 IPC_STRUCT_TRAITS_END() |
45 | 47 |
46 IPC_STRUCT_TRAITS_BEGIN(PP_FloatPoint) | 48 IPC_STRUCT_TRAITS_BEGIN(PP_FloatPoint) |
47 IPC_STRUCT_TRAITS_MEMBER(x) | 49 IPC_STRUCT_TRAITS_MEMBER(x) |
48 IPC_STRUCT_TRAITS_MEMBER(y) | 50 IPC_STRUCT_TRAITS_MEMBER(y) |
49 IPC_STRUCT_TRAITS_END() | 51 IPC_STRUCT_TRAITS_END() |
50 | 52 |
51 IPC_STRUCT_TRAITS_BEGIN(PP_Size) | 53 IPC_STRUCT_TRAITS_BEGIN(PP_Size) |
52 IPC_STRUCT_TRAITS_MEMBER(height) | 54 IPC_STRUCT_TRAITS_MEMBER(height) |
53 IPC_STRUCT_TRAITS_MEMBER(width) | 55 IPC_STRUCT_TRAITS_MEMBER(width) |
54 IPC_STRUCT_TRAITS_END() | 56 IPC_STRUCT_TRAITS_END() |
55 | 57 |
56 IPC_STRUCT_TRAITS_BEGIN(PP_Rect) | 58 IPC_STRUCT_TRAITS_BEGIN(PP_Rect) |
57 IPC_STRUCT_TRAITS_MEMBER(point) | 59 IPC_STRUCT_TRAITS_MEMBER(point) |
58 IPC_STRUCT_TRAITS_MEMBER(size) | 60 IPC_STRUCT_TRAITS_MEMBER(size) |
59 IPC_STRUCT_TRAITS_END() | 61 IPC_STRUCT_TRAITS_END() |
60 | 62 |
| 63 IPC_STRUCT_TRAITS_BEGIN(PP_PictureBuffer_Dev) |
| 64 IPC_STRUCT_TRAITS_MEMBER(id) |
| 65 IPC_STRUCT_TRAITS_MEMBER(size) |
| 66 IPC_STRUCT_TRAITS_MEMBER(texture_id) |
| 67 IPC_STRUCT_TRAITS_END() |
| 68 |
| 69 IPC_STRUCT_TRAITS_BEGIN(PP_Picture_Dev) |
| 70 IPC_STRUCT_TRAITS_MEMBER(picture_buffer_id) |
| 71 IPC_STRUCT_TRAITS_MEMBER(bitstream_buffer_id) |
| 72 IPC_STRUCT_TRAITS_END() |
| 73 |
61 IPC_STRUCT_TRAITS_BEGIN(::ppapi::Preferences) | 74 IPC_STRUCT_TRAITS_BEGIN(::ppapi::Preferences) |
62 IPC_STRUCT_TRAITS_MEMBER(standard_font_family) | 75 IPC_STRUCT_TRAITS_MEMBER(standard_font_family) |
63 IPC_STRUCT_TRAITS_MEMBER(fixed_font_family) | 76 IPC_STRUCT_TRAITS_MEMBER(fixed_font_family) |
64 IPC_STRUCT_TRAITS_MEMBER(serif_font_family) | 77 IPC_STRUCT_TRAITS_MEMBER(serif_font_family) |
65 IPC_STRUCT_TRAITS_MEMBER(sans_serif_font_family) | 78 IPC_STRUCT_TRAITS_MEMBER(sans_serif_font_family) |
66 IPC_STRUCT_TRAITS_MEMBER(default_font_size) | 79 IPC_STRUCT_TRAITS_MEMBER(default_font_size) |
67 IPC_STRUCT_TRAITS_MEMBER(default_fixed_font_size) | 80 IPC_STRUCT_TRAITS_MEMBER(default_fixed_font_size) |
68 IPC_STRUCT_TRAITS_END() | 81 IPC_STRUCT_TRAITS_END() |
69 | 82 |
70 IPC_STRUCT_TRAITS_BEGIN(::ppapi::InputEventData) | 83 IPC_STRUCT_TRAITS_BEGIN(::ppapi::InputEventData) |
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
310 | 323 |
311 // PPB_URLLoader | 324 // PPB_URLLoader |
312 // (Messages from browser to plugin to notify it of changes in state.) | 325 // (Messages from browser to plugin to notify it of changes in state.) |
313 IPC_MESSAGE_ROUTED1(PpapiMsg_PPBURLLoader_UpdateProgress, | 326 IPC_MESSAGE_ROUTED1(PpapiMsg_PPBURLLoader_UpdateProgress, |
314 pp::proxy::PPBURLLoader_UpdateProgress_Params /* params */) | 327 pp::proxy::PPBURLLoader_UpdateProgress_Params /* params */) |
315 IPC_MESSAGE_ROUTED3(PpapiMsg_PPBURLLoader_ReadResponseBody_Ack, | 328 IPC_MESSAGE_ROUTED3(PpapiMsg_PPBURLLoader_ReadResponseBody_Ack, |
316 pp::proxy::HostResource /* loader */, | 329 pp::proxy::HostResource /* loader */, |
317 int32 /* result */, | 330 int32 /* result */, |
318 std::string /* data */) | 331 std::string /* data */) |
319 | 332 |
| 333 // PPB_VideoDecoder_Dev. |
| 334 // (Messages from renderer to plugin to notify it to run callbacks.) |
| 335 IPC_MESSAGE_ROUTED3(PpapiMsg_PPBVideoDecoder_EndOfBitstreamACK, |
| 336 pp::proxy::HostResource /* video_decoder */, |
| 337 int32_t /* bitstream buffer id */, |
| 338 int32_t /* PP_CompletionCallback result */) |
| 339 IPC_MESSAGE_ROUTED2(PpapiMsg_PPBVideoDecoder_FlushACK, |
| 340 pp::proxy::HostResource /* video_decoder */, |
| 341 int32_t /* PP_CompletionCallback result */) |
| 342 IPC_MESSAGE_ROUTED2(PpapiMsg_PPBVideoDecoder_ResetACK, |
| 343 pp::proxy::HostResource /* video_decoder */, |
| 344 int32_t /* PP_CompletionCallback result */) |
| 345 |
| 346 // PPP_VideoDecoder_Dev. |
| 347 IPC_MESSAGE_ROUTED3(PpapiMsg_PPPVideoDecoder_ProvidePictureBuffers, |
| 348 pp::proxy::HostResource /* video_decoder */, |
| 349 uint32_t /* requested number of buffers */, |
| 350 PP_Size /* dimensions of buffers */) |
| 351 IPC_MESSAGE_ROUTED2(PpapiMsg_PPPVideoDecoder_DismissPictureBuffer, |
| 352 pp::proxy::HostResource /* video_decoder */, |
| 353 int32_t /* picture buffer id */) |
| 354 IPC_MESSAGE_ROUTED2(PpapiMsg_PPPVideoDecoder_PictureReady, |
| 355 pp::proxy::HostResource /* video_decoder */, |
| 356 PP_Picture_Dev /* output picture */) |
| 357 IPC_MESSAGE_ROUTED1(PpapiMsg_PPPVideoDecoder_NotifyEndOfStream, |
| 358 pp::proxy::HostResource /* video_decoder */) |
| 359 IPC_MESSAGE_ROUTED2(PpapiMsg_PPPVideoDecoder_NotifyError, |
| 360 pp::proxy::HostResource /* video_decoder */, |
| 361 PP_VideoDecodeError_Dev /* error */) |
| 362 |
320 // ----------------------------------------------------------------------------- | 363 // ----------------------------------------------------------------------------- |
321 // These are from the plugin to the renderer. | 364 // These are from the plugin to the renderer. |
322 | 365 |
323 // Reply to PpapiMsg_CreateChannel. The handle will be NULL if the channel | 366 // Reply to PpapiMsg_CreateChannel. The handle will be NULL if the channel |
324 // could not be established. This could be because the IPC could not be created | 367 // could not be established. This could be because the IPC could not be created |
325 // for some weird reason, but more likely that the plugin failed to load or | 368 // for some weird reason, but more likely that the plugin failed to load or |
326 // initialize properly. | 369 // initialize properly. |
327 IPC_MESSAGE_CONTROL1(PpapiHostMsg_ChannelCreated, | 370 IPC_MESSAGE_CONTROL1(PpapiHostMsg_ChannelCreated, |
328 IPC::ChannelHandle /* handle */) | 371 IPC::ChannelHandle /* handle */) |
329 | 372 |
(...skipping 565 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
895 PP_Bool /* is_always_opaque */, | 938 PP_Bool /* is_always_opaque */, |
896 pp::proxy::HostResource /* result */) | 939 pp::proxy::HostResource /* result */) |
897 IPC_SYNC_MESSAGE_ROUTED4_3(PpapiHostMsg_ResourceCreation_ImageData, | 940 IPC_SYNC_MESSAGE_ROUTED4_3(PpapiHostMsg_ResourceCreation_ImageData, |
898 PP_Instance /* instance */, | 941 PP_Instance /* instance */, |
899 int32 /* format */, | 942 int32 /* format */, |
900 PP_Size /* size */, | 943 PP_Size /* size */, |
901 PP_Bool /* init_to_zero */, | 944 PP_Bool /* init_to_zero */, |
902 pp::proxy::HostResource /* result_resource */, | 945 pp::proxy::HostResource /* result_resource */, |
903 std::string /* image_data_desc */, | 946 std::string /* image_data_desc */, |
904 pp::proxy::ImageHandle /* result */) | 947 pp::proxy::ImageHandle /* result */) |
| 948 // PPB_VideoDecoder. |
| 949 IPC_SYNC_MESSAGE_ROUTED3_1(PpapiHostMsg_PPBVideoDecoder_Create, |
| 950 PP_Instance /* instance */, |
| 951 pp::proxy::HostResource /* context */, |
| 952 std::vector<PP_VideoConfigElement> /* config */, |
| 953 pp::proxy::HostResource /* result */) |
| 954 IPC_MESSAGE_ROUTED4(PpapiHostMsg_PPBVideoDecoder_Decode, |
| 955 pp::proxy::HostResource /* video_decoder */, |
| 956 pp::proxy::HostResource /* bitstream buffer */, |
| 957 int32 /* bitstream buffer id */, |
| 958 int32 /* size of buffer */) |
| 959 IPC_MESSAGE_ROUTED2(PpapiHostMsg_PPBVideoDecoder_AssignPictureBuffers, |
| 960 pp::proxy::HostResource /* video_decoder */, |
| 961 std::vector<PP_PictureBuffer_Dev> /* picture buffers */) |
| 962 IPC_MESSAGE_ROUTED2(PpapiHostMsg_PPBVideoDecoder_ReusePictureBuffer, |
| 963 pp::proxy::HostResource /* video_decoder */, |
| 964 int32_t /* picture buffer id */) |
| 965 IPC_MESSAGE_ROUTED1(PpapiHostMsg_PPBVideoDecoder_Flush, |
| 966 pp::proxy::HostResource /* video_decoder */) |
| 967 IPC_MESSAGE_ROUTED1(PpapiHostMsg_PPBVideoDecoder_Reset, |
| 968 pp::proxy::HostResource /* video_decoder */) |
| 969 IPC_SYNC_MESSAGE_ROUTED1_0(PpapiHostMsg_PPBVideoDecoder_Destroy, |
| 970 pp::proxy::HostResource /* video_decoder */) |
OLD | NEW |