Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(679)

Side by Side Diff: ppapi/proxy/serialized_structs.h

Issue 6334016: Refactor PPAPI proxy resource handling to maintain which host they came from,... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 "ppapi/c/pp_bool.h" 14 #include "ppapi/c/pp_bool.h"
14 #include "ppapi/c/pp_instance.h" 15 #include "ppapi/c/pp_instance.h"
15 #include "ppapi/c/pp_point.h" 16 #include "ppapi/c/pp_point.h"
16 #include "ppapi/c/pp_rect.h" 17 #include "ppapi/c/pp_rect.h"
17 #include "ppapi/c/pp_resource.h" 18 #include "ppapi/proxy/serialized_resource.h"
18 #include "ppapi/proxy/serialized_var.h" 19 #include "ppapi/proxy/serialized_var.h"
19 20
20 struct PP_FontDescription_Dev; 21 struct PP_FontDescription_Dev;
21 22
22 namespace pp { 23 namespace pp {
23 namespace proxy { 24 namespace proxy {
24 25
25 class Dispatcher; 26 class Dispatcher;
26 27
27 // 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
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 struct SerializedDirEntry { 68 struct SerializedDirEntry {
68 std::string name; 69 std::string name;
69 bool is_dir; 70 bool is_dir;
70 }; 71 };
71 72
72 // Since there are so many parameters, DrawTextAt requires this separate 73 // Since there are so many parameters, DrawTextAt requires this separate
73 // structure. This includes everything but the font name. Because the font name 74 // structure. This includes everything but the font name. Because the font name
74 // is a var, it's much more convenient to use the normal way of passing a 75 // is a var, it's much more convenient to use the normal way of passing a
75 // PP_Var. 76 // PP_Var.
76 struct PPBFont_DrawTextAt_Params { 77 struct PPBFont_DrawTextAt_Params {
77 PP_Resource font; 78 SerializedResource font;
78 PP_Resource image_data; 79 SerializedResource image_data;
79 PP_Bool text_is_rtl; 80 PP_Bool text_is_rtl;
80 PP_Bool override_direction; 81 PP_Bool override_direction;
81 PP_Point position; 82 PP_Point position;
82 uint32_t color; 83 uint32_t color;
83 PP_Rect clip; 84 PP_Rect clip;
84 bool clip_is_null; 85 bool clip_is_null;
85 PP_Bool image_data_is_opaque; 86 PP_Bool image_data_is_opaque;
86 }; 87 };
87 88
88 struct PPBFlash_DrawGlyphs_Params { 89 struct PPBFlash_DrawGlyphs_Params {
89 PPBFlash_DrawGlyphs_Params(); 90 PPBFlash_DrawGlyphs_Params();
90 ~PPBFlash_DrawGlyphs_Params(); 91 ~PPBFlash_DrawGlyphs_Params();
91 92
92 PP_Instance instance; 93 PP_Instance instance;
93 PP_Resource pp_image_data; 94 SerializedResource image_data;
94 SerializedFontDescription font_desc; 95 SerializedFontDescription font_desc;
95 uint32_t color; 96 uint32_t color;
96 PP_Point position; 97 PP_Point position;
97 PP_Rect clip; 98 PP_Rect clip;
98 float transformation[3][3]; 99 float transformation[3][3];
99 std::vector<uint16_t> glyph_indices; 100 std::vector<uint16_t> glyph_indices;
100 std::vector<PP_Point> glyph_advances; 101 std::vector<PP_Point> glyph_advances;
101 }; 102 };
102 103
104 struct PPBAudio_NotifyAudioStreamCreated_Params {
105 PP_Instance instance;
106 pp::proxy::SerializedResource audio_id;
107 int32_t result_code; // Will be != PP_OK on failure
108 IPC::PlatformFileForTransit socket_handle;
109 base::SharedMemoryHandle handle;
110 int32_t length;
111 };
112
113 struct PPBURLLoader_UpdateProgress_Params {
114 PP_Instance instance;
115 pp::proxy::SerializedResource resource;
116 int64_t bytes_sent;
117 int64_t total_bytes_to_be_sent;
118 int64_t bytes_received;
119 int64_t total_bytes_to_be_received;
120 };
121
103 #if defined(OS_WIN) 122 #if defined(OS_WIN)
104 typedef HANDLE ImageHandle; 123 typedef HANDLE ImageHandle;
105 #elif defined(OS_MACOSX) 124 #elif defined(OS_MACOSX)
106 typedef base::SharedMemoryHandle ImageHandle; 125 typedef base::SharedMemoryHandle ImageHandle;
107 #else 126 #else
108 // On X Windows this is a SysV shared memory key. 127 // On X Windows this is a SysV shared memory key.
109 typedef int ImageHandle; 128 typedef int ImageHandle;
110 #endif 129 #endif
111 130
112 } // namespace proxy 131 } // namespace proxy
113 } // namespace pp 132 } // namespace pp
114 133
115 #endif // PPAPI_PROXY_SERIALIZED_STRUCTS_H_ 134 #endif // PPAPI_PROXY_SERIALIZED_STRUCTS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698