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_PPAPI_PARAM_TRAITS_H_ | 5 #ifndef PPAPI_PROXY_PPAPI_PARAM_TRAITS_H_ |
6 #define PPAPI_PROXY_PPAPI_PARAM_TRAITS_H_ | 6 #define PPAPI_PROXY_PPAPI_PARAM_TRAITS_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
11 #include "ipc/ipc_message_utils.h" | 11 #include "ipc/ipc_message_utils.h" |
12 #include "ipc/ipc_platform_file.h" | 12 #include "ipc/ipc_platform_file.h" |
13 #include "ppapi/c/pp_completion_callback.h" | 13 #include "ppapi/c/pp_completion_callback.h" |
14 #include "ppapi/c/pp_rect.h" | 14 #include "ppapi/c/pp_rect.h" |
15 #include "ppapi/c/pp_var.h" | 15 #include "ppapi/c/pp_var.h" |
16 | 16 |
17 struct PP_FileInfo; | 17 struct PP_FileInfo; |
18 struct PP_ObjectProperty; | 18 struct PP_ObjectProperty; |
19 struct PP_Flash_Menu; | 19 struct PP_Flash_Menu; |
20 struct PP_Flash_NetAddress; | 20 struct PP_Flash_NetAddress; |
21 | 21 |
| 22 namespace ppapi { |
| 23 |
| 24 class HostResource; |
| 25 |
| 26 } // namespace ppapi |
| 27 |
22 namespace pp { | 28 namespace pp { |
23 namespace proxy { | 29 namespace proxy { |
24 | 30 |
25 class HostResource; | |
26 struct PPBFileRef_CreateInfo; | 31 struct PPBFileRef_CreateInfo; |
27 struct PPBFlash_DrawGlyphs_Params; | 32 struct PPBFlash_DrawGlyphs_Params; |
28 struct PPBURLLoader_UpdateProgress_Params; | 33 struct PPBURLLoader_UpdateProgress_Params; |
29 struct SerializedDirEntry; | 34 struct SerializedDirEntry; |
30 struct SerializedFontDescription; | 35 struct SerializedFontDescription; |
31 class SerializedFlashMenu; | 36 class SerializedFlashMenu; |
32 class SerializedVar; | 37 class SerializedVar; |
33 | 38 |
34 } // namespace proxy | 39 } // namespace proxy |
35 } // namespace pp | 40 } // namespace pp |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
102 | 107 |
103 template<> | 108 template<> |
104 struct ParamTraits<pp::proxy::SerializedFontDescription> { | 109 struct ParamTraits<pp::proxy::SerializedFontDescription> { |
105 typedef pp::proxy::SerializedFontDescription param_type; | 110 typedef pp::proxy::SerializedFontDescription param_type; |
106 static void Write(Message* m, const param_type& p); | 111 static void Write(Message* m, const param_type& p); |
107 static bool Read(const Message* m, void** iter, param_type* r); | 112 static bool Read(const Message* m, void** iter, param_type* r); |
108 static void Log(const param_type& p, std::string* l); | 113 static void Log(const param_type& p, std::string* l); |
109 }; | 114 }; |
110 | 115 |
111 template<> | 116 template<> |
112 struct ParamTraits<pp::proxy::HostResource> { | 117 struct ParamTraits<ppapi::HostResource> { |
113 typedef pp::proxy::HostResource param_type; | 118 typedef ppapi::HostResource param_type; |
114 static void Write(Message* m, const param_type& p); | 119 static void Write(Message* m, const param_type& p); |
115 static bool Read(const Message* m, void** iter, param_type* r); | 120 static bool Read(const Message* m, void** iter, param_type* r); |
116 static void Log(const param_type& p, std::string* l); | 121 static void Log(const param_type& p, std::string* l); |
117 }; | 122 }; |
118 | 123 |
119 template<> | 124 template<> |
120 struct ParamTraits<pp::proxy::SerializedVar> { | 125 struct ParamTraits<pp::proxy::SerializedVar> { |
121 typedef pp::proxy::SerializedVar param_type; | 126 typedef pp::proxy::SerializedVar param_type; |
122 static void Write(Message* m, const param_type& p); | 127 static void Write(Message* m, const param_type& p); |
123 static bool Read(const Message* m, void** iter, param_type* r); | 128 static bool Read(const Message* m, void** iter, param_type* r); |
(...skipping 20 matching lines...) Expand all Loading... |
144 struct ParamTraits<pp::proxy::SerializedFlashMenu> { | 149 struct ParamTraits<pp::proxy::SerializedFlashMenu> { |
145 typedef pp::proxy::SerializedFlashMenu param_type; | 150 typedef pp::proxy::SerializedFlashMenu param_type; |
146 static void Write(Message* m, const param_type& p); | 151 static void Write(Message* m, const param_type& p); |
147 static bool Read(const Message* m, void** iter, param_type* r); | 152 static bool Read(const Message* m, void** iter, param_type* r); |
148 static void Log(const param_type& p, std::string* l); | 153 static void Log(const param_type& p, std::string* l); |
149 }; | 154 }; |
150 | 155 |
151 } // namespace IPC | 156 } // namespace IPC |
152 | 157 |
153 #endif // PPAPI_PROXY_PPAPI_PARAM_TRAITS_H_ | 158 #endif // PPAPI_PROXY_PPAPI_PARAM_TRAITS_H_ |
OLD | NEW |