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 #ifndef PPAPI_PROXY_SERIALIZED_STRUCTS_H_ | 5 #ifndef PPAPI_PROXY_SERIALIZED_STRUCTS_H_ |
6 #define PPAPI_PROXY_SERIALIZED_STRUCTS_H_ | 6 #define PPAPI_PROXY_SERIALIZED_STRUCTS_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
11 #include "base/shared_memory.h" | 11 #include "base/shared_memory.h" |
12 #include "build/build_config.h" | 12 #include "build/build_config.h" |
13 #include "ipc/ipc_platform_file.h" | 13 #include "ipc/ipc_platform_file.h" |
14 #include "ppapi/c/pp_bool.h" | 14 #include "ppapi/c/pp_bool.h" |
15 #include "ppapi/c/pp_instance.h" | 15 #include "ppapi/c/pp_instance.h" |
16 #include "ppapi/c/pp_point.h" | 16 #include "ppapi/c/pp_point.h" |
17 #include "ppapi/c/pp_rect.h" | 17 #include "ppapi/c/pp_rect.h" |
18 #include "ppapi/proxy/host_resource.h" | |
19 #include "ppapi/proxy/serialized_var.h" | 18 #include "ppapi/proxy/serialized_var.h" |
| 19 #include "ppapi/shared_impl/host_resource.h" |
20 | 20 |
21 struct PP_FontDescription_Dev; | 21 struct PP_FontDescription_Dev; |
22 | 22 |
23 namespace pp { | 23 namespace pp { |
24 namespace proxy { | 24 namespace proxy { |
25 | 25 |
26 class Dispatcher; | 26 class Dispatcher; |
27 | 27 |
28 // PP_FontDescript_Dev has to be redefined with a SerializedVar in place of | 28 // PP_FontDescript_Dev has to be redefined with a SerializedVar in place of |
29 // the PP_Var used for the face name. | 29 // the PP_Var used for the face name. |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 struct SerializedDirEntry { | 68 struct SerializedDirEntry { |
69 std::string name; | 69 std::string name; |
70 bool is_dir; | 70 bool is_dir; |
71 }; | 71 }; |
72 | 72 |
73 // FileRefs are created in a number of places and they include a number of | 73 // FileRefs are created in a number of places and they include a number of |
74 // return values. This struct encapsulates everything in one place. | 74 // return values. This struct encapsulates everything in one place. |
75 struct PPBFileRef_CreateInfo { | 75 struct PPBFileRef_CreateInfo { |
76 PPBFileRef_CreateInfo(); // Initializes to 0. | 76 PPBFileRef_CreateInfo(); // Initializes to 0. |
77 | 77 |
78 HostResource resource; | 78 ppapi::HostResource resource; |
79 int file_system_type; // One of PP_FileSystemType values. | 79 int file_system_type; // One of PP_FileSystemType values. |
80 SerializedVar path; | 80 SerializedVar path; |
81 SerializedVar name; | 81 SerializedVar name; |
82 }; | 82 }; |
83 | 83 |
84 struct PPBFlash_DrawGlyphs_Params { | 84 struct PPBFlash_DrawGlyphs_Params { |
85 PPBFlash_DrawGlyphs_Params(); | 85 PPBFlash_DrawGlyphs_Params(); |
86 ~PPBFlash_DrawGlyphs_Params(); | 86 ~PPBFlash_DrawGlyphs_Params(); |
87 | 87 |
88 PP_Instance instance; | 88 PP_Instance instance; |
89 HostResource image_data; | 89 ppapi::HostResource image_data; |
90 SerializedFontDescription font_desc; | 90 SerializedFontDescription font_desc; |
91 uint32_t color; | 91 uint32_t color; |
92 PP_Point position; | 92 PP_Point position; |
93 PP_Rect clip; | 93 PP_Rect clip; |
94 float transformation[3][3]; | 94 float transformation[3][3]; |
95 std::vector<uint16_t> glyph_indices; | 95 std::vector<uint16_t> glyph_indices; |
96 std::vector<PP_Point> glyph_advances; | 96 std::vector<PP_Point> glyph_advances; |
97 }; | 97 }; |
98 | 98 |
99 struct PPBAudio_NotifyAudioStreamCreated_Params { | 99 struct PPBAudio_NotifyAudioStreamCreated_Params { |
100 pp::proxy::HostResource audio_id; | 100 ppapi::HostResource audio_id; |
101 int32_t result_code; // Will be != PP_OK on failure | 101 int32_t result_code; // Will be != PP_OK on failure |
102 IPC::PlatformFileForTransit socket_handle; | 102 IPC::PlatformFileForTransit socket_handle; |
103 base::SharedMemoryHandle handle; | 103 base::SharedMemoryHandle handle; |
104 int32_t length; | 104 int32_t length; |
105 }; | 105 }; |
106 | 106 |
107 struct PPBURLLoader_UpdateProgress_Params { | 107 struct PPBURLLoader_UpdateProgress_Params { |
108 PP_Instance instance; | 108 PP_Instance instance; |
109 pp::proxy::HostResource resource; | 109 ppapi::HostResource resource; |
110 int64_t bytes_sent; | 110 int64_t bytes_sent; |
111 int64_t total_bytes_to_be_sent; | 111 int64_t total_bytes_to_be_sent; |
112 int64_t bytes_received; | 112 int64_t bytes_received; |
113 int64_t total_bytes_to_be_received; | 113 int64_t total_bytes_to_be_received; |
114 }; | 114 }; |
115 | 115 |
116 struct PPPVideoCapture_Buffer { | 116 struct PPPVideoCapture_Buffer { |
117 pp::proxy::HostResource resource; | 117 ppapi::HostResource resource; |
118 uint32_t size; | 118 uint32_t size; |
119 base::SharedMemoryHandle handle; | 119 base::SharedMemoryHandle handle; |
120 }; | 120 }; |
121 | 121 |
122 #if defined(OS_WIN) | 122 #if defined(OS_WIN) |
123 typedef HANDLE ImageHandle; | 123 typedef HANDLE ImageHandle; |
124 #elif defined(OS_MACOSX) | 124 #elif defined(OS_MACOSX) |
125 typedef base::SharedMemoryHandle ImageHandle; | 125 typedef base::SharedMemoryHandle ImageHandle; |
126 #else | 126 #else |
127 // On X Windows this is a SysV shared memory key. | 127 // On X Windows this is a SysV shared memory key. |
128 typedef int ImageHandle; | 128 typedef int ImageHandle; |
129 #endif | 129 #endif |
130 | 130 |
131 } // namespace proxy | 131 } // namespace proxy |
132 } // namespace pp | 132 } // namespace pp |
133 | 133 |
134 #endif // PPAPI_PROXY_SERIALIZED_STRUCTS_H_ | 134 #endif // PPAPI_PROXY_SERIALIZED_STRUCTS_H_ |
OLD | NEW |