OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 |
(...skipping 15 matching lines...) Expand all Loading... |
26 | 26 |
27 class HostResource; | 27 class HostResource; |
28 class PPB_X509Certificate_Fields; | 28 class PPB_X509Certificate_Fields; |
29 | 29 |
30 namespace proxy { | 30 namespace proxy { |
31 | 31 |
32 struct PPBFlash_DrawGlyphs_Params; | 32 struct PPBFlash_DrawGlyphs_Params; |
33 struct PPBURLLoader_UpdateProgress_Params; | 33 struct PPBURLLoader_UpdateProgress_Params; |
34 struct SerializedDirEntry; | 34 struct SerializedDirEntry; |
35 struct SerializedFontDescription; | 35 struct SerializedFontDescription; |
| 36 struct SerializedTrueTypeFontDesc; |
36 class SerializedFlashMenu; | 37 class SerializedFlashMenu; |
37 class SerializedHandle; | 38 class SerializedHandle; |
38 class SerializedVar; | 39 class SerializedVar; |
39 | 40 |
40 } // namespace proxy | 41 } // namespace proxy |
41 } // namespace ppapi | 42 } // namespace ppapi |
42 | 43 |
43 namespace IPC { | 44 namespace IPC { |
44 | 45 |
45 template<> | 46 template<> |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
110 | 111 |
111 template<> | 112 template<> |
112 struct PPAPI_PROXY_EXPORT ParamTraits<ppapi::proxy::SerializedFontDescription> { | 113 struct PPAPI_PROXY_EXPORT ParamTraits<ppapi::proxy::SerializedFontDescription> { |
113 typedef ppapi::proxy::SerializedFontDescription param_type; | 114 typedef ppapi::proxy::SerializedFontDescription param_type; |
114 static void Write(Message* m, const param_type& p); | 115 static void Write(Message* m, const param_type& p); |
115 static bool Read(const Message* m, PickleIterator* iter, param_type* r); | 116 static bool Read(const Message* m, PickleIterator* iter, param_type* r); |
116 static void Log(const param_type& p, std::string* l); | 117 static void Log(const param_type& p, std::string* l); |
117 }; | 118 }; |
118 | 119 |
119 template<> | 120 template<> |
| 121 struct PPAPI_PROXY_EXPORT |
| 122 ParamTraits<ppapi::proxy::SerializedTrueTypeFontDesc> { |
| 123 typedef ppapi::proxy::SerializedTrueTypeFontDesc param_type; |
| 124 static void Write(Message* m, const param_type& p); |
| 125 static bool Read(const Message* m, PickleIterator* iter, param_type* r); |
| 126 static void Log(const param_type& p, std::string* l); |
| 127 }; |
| 128 |
| 129 template<> |
120 struct PPAPI_PROXY_EXPORT ParamTraits<ppapi::proxy::SerializedHandle> { | 130 struct PPAPI_PROXY_EXPORT ParamTraits<ppapi::proxy::SerializedHandle> { |
121 typedef ppapi::proxy::SerializedHandle param_type; | 131 typedef ppapi::proxy::SerializedHandle param_type; |
122 static void Write(Message* m, const param_type& p); | 132 static void Write(Message* m, const param_type& p); |
123 static bool Read(const Message* m, PickleIterator* iter, param_type* r); | 133 static bool Read(const Message* m, PickleIterator* iter, param_type* r); |
124 static void Log(const param_type& p, std::string* l); | 134 static void Log(const param_type& p, std::string* l); |
125 }; | 135 }; |
126 | 136 |
127 template<> | 137 template<> |
128 struct PPAPI_PROXY_EXPORT ParamTraits<ppapi::HostResource> { | 138 struct PPAPI_PROXY_EXPORT ParamTraits<ppapi::HostResource> { |
129 typedef ppapi::HostResource param_type; | 139 typedef ppapi::HostResource param_type; |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
189 typedef ppapi::PPB_X509Certificate_Fields param_type; | 199 typedef ppapi::PPB_X509Certificate_Fields param_type; |
190 static void Write(Message* m, const param_type& p); | 200 static void Write(Message* m, const param_type& p); |
191 static bool Read(const Message* m, PickleIterator* iter, param_type* r); | 201 static bool Read(const Message* m, PickleIterator* iter, param_type* r); |
192 static void Log(const param_type& p, std::string* l); | 202 static void Log(const param_type& p, std::string* l); |
193 }; | 203 }; |
194 | 204 |
195 | 205 |
196 } // namespace IPC | 206 } // namespace IPC |
197 | 207 |
198 #endif // PPAPI_PROXY_PPAPI_PARAM_TRAITS_H_ | 208 #endif // PPAPI_PROXY_PPAPI_PARAM_TRAITS_H_ |
OLD | NEW |