| 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 14 matching lines...) Expand all Loading... |
| 25 class HostResource; | 25 class HostResource; |
| 26 class PPB_X509Certificate_Fields; | 26 class PPB_X509Certificate_Fields; |
| 27 | 27 |
| 28 namespace proxy { | 28 namespace proxy { |
| 29 | 29 |
| 30 struct PPBFlash_DrawGlyphs_Params; | 30 struct PPBFlash_DrawGlyphs_Params; |
| 31 struct PPBURLLoader_UpdateProgress_Params; | 31 struct PPBURLLoader_UpdateProgress_Params; |
| 32 struct SerializedDirEntry; | 32 struct SerializedDirEntry; |
| 33 struct SerializedFontDescription; | 33 struct SerializedFontDescription; |
| 34 class SerializedFlashMenu; | 34 class SerializedFlashMenu; |
| 35 class SerializedHandle; |
| 35 class SerializedVar; | 36 class SerializedVar; |
| 36 | 37 |
| 37 } // namespace proxy | 38 } // namespace proxy |
| 38 } // namespace ppapi | 39 } // namespace ppapi |
| 39 | 40 |
| 40 namespace IPC { | 41 namespace IPC { |
| 41 | 42 |
| 42 template<> | 43 template<> |
| 43 struct PPAPI_PROXY_EXPORT ParamTraits<PP_Bool> { | 44 struct PPAPI_PROXY_EXPORT ParamTraits<PP_Bool> { |
| 44 typedef PP_Bool param_type; | 45 typedef PP_Bool param_type; |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 107 | 108 |
| 108 template<> | 109 template<> |
| 109 struct PPAPI_PROXY_EXPORT ParamTraits<ppapi::proxy::SerializedFontDescription> { | 110 struct PPAPI_PROXY_EXPORT ParamTraits<ppapi::proxy::SerializedFontDescription> { |
| 110 typedef ppapi::proxy::SerializedFontDescription param_type; | 111 typedef ppapi::proxy::SerializedFontDescription param_type; |
| 111 static void Write(Message* m, const param_type& p); | 112 static void Write(Message* m, const param_type& p); |
| 112 static bool Read(const Message* m, PickleIterator* iter, param_type* r); | 113 static bool Read(const Message* m, PickleIterator* iter, param_type* r); |
| 113 static void Log(const param_type& p, std::string* l); | 114 static void Log(const param_type& p, std::string* l); |
| 114 }; | 115 }; |
| 115 | 116 |
| 116 template<> | 117 template<> |
| 118 struct PPAPI_PROXY_EXPORT ParamTraits<ppapi::proxy::SerializedHandle> { |
| 119 typedef ppapi::proxy::SerializedHandle param_type; |
| 120 static void Write(Message* m, const param_type& p); |
| 121 static bool Read(const Message* m, PickleIterator* iter, param_type* r); |
| 122 static void Log(const param_type& p, std::string* l); |
| 123 }; |
| 124 |
| 125 template<> |
| 117 struct PPAPI_PROXY_EXPORT ParamTraits<ppapi::HostResource> { | 126 struct PPAPI_PROXY_EXPORT ParamTraits<ppapi::HostResource> { |
| 118 typedef ppapi::HostResource param_type; | 127 typedef ppapi::HostResource param_type; |
| 119 static void Write(Message* m, const param_type& p); | 128 static void Write(Message* m, const param_type& p); |
| 120 static bool Read(const Message* m, PickleIterator* iter, param_type* r); | 129 static bool Read(const Message* m, PickleIterator* iter, param_type* r); |
| 121 static void Log(const param_type& p, std::string* l); | 130 static void Log(const param_type& p, std::string* l); |
| 122 }; | 131 }; |
| 123 | 132 |
| 124 template<> | 133 template<> |
| 125 struct PPAPI_PROXY_EXPORT ParamTraits<ppapi::proxy::SerializedVar> { | 134 struct PPAPI_PROXY_EXPORT ParamTraits<ppapi::proxy::SerializedVar> { |
| 126 typedef ppapi::proxy::SerializedVar param_type; | 135 typedef ppapi::proxy::SerializedVar param_type; |
| (...skipping 13 matching lines...) Expand all Loading... |
| 140 | 149 |
| 141 template<> | 150 template<> |
| 142 struct PPAPI_PROXY_EXPORT ParamTraits< std::vector< | 151 struct PPAPI_PROXY_EXPORT ParamTraits< std::vector< |
| 143 ppapi::PPB_FileRef_CreateInfo> > { | 152 ppapi::PPB_FileRef_CreateInfo> > { |
| 144 typedef std::vector<ppapi::PPB_FileRef_CreateInfo> param_type; | 153 typedef std::vector<ppapi::PPB_FileRef_CreateInfo> param_type; |
| 145 static void Write(Message* m, const param_type& p); | 154 static void Write(Message* m, const param_type& p); |
| 146 static bool Read(const Message* m, PickleIterator* iter, param_type* r); | 155 static bool Read(const Message* m, PickleIterator* iter, param_type* r); |
| 147 static void Log(const param_type& p, std::string* l); | 156 static void Log(const param_type& p, std::string* l); |
| 148 }; | 157 }; |
| 149 | 158 |
| 150 #if !defined(OS_NACL) | 159 #if !defined(OS_NACL) && !defined(NACL_WIN64) |
| 151 template<> | 160 template<> |
| 152 struct PPAPI_PROXY_EXPORT ParamTraits<ppapi::proxy::SerializedFlashMenu> { | 161 struct PPAPI_PROXY_EXPORT ParamTraits<ppapi::proxy::SerializedFlashMenu> { |
| 153 typedef ppapi::proxy::SerializedFlashMenu param_type; | 162 typedef ppapi::proxy::SerializedFlashMenu param_type; |
| 154 static void Write(Message* m, const param_type& p); | 163 static void Write(Message* m, const param_type& p); |
| 155 static bool Read(const Message* m, PickleIterator* iter, param_type* r); | 164 static bool Read(const Message* m, PickleIterator* iter, param_type* r); |
| 156 static void Log(const param_type& p, std::string* l); | 165 static void Log(const param_type& p, std::string* l); |
| 157 }; | 166 }; |
| 158 | 167 |
| 159 template<> | 168 template<> |
| 160 struct PPAPI_PROXY_EXPORT ParamTraits<ppapi::PPB_X509Certificate_Fields> { | 169 struct PPAPI_PROXY_EXPORT ParamTraits<ppapi::PPB_X509Certificate_Fields> { |
| 161 typedef ppapi::PPB_X509Certificate_Fields param_type; | 170 typedef ppapi::PPB_X509Certificate_Fields param_type; |
| 162 static void Write(Message* m, const param_type& p); | 171 static void Write(Message* m, const param_type& p); |
| 163 static bool Read(const Message* m, PickleIterator* iter, param_type* r); | 172 static bool Read(const Message* m, PickleIterator* iter, param_type* r); |
| 164 static void Log(const param_type& p, std::string* l); | 173 static void Log(const param_type& p, std::string* l); |
| 165 }; | 174 }; |
| 166 #endif // !defined(OS_NACL) | 175 #endif // !defined(OS_NACL) && !defined(NACL_WIN64) |
| 176 |
| 167 | 177 |
| 168 } // namespace IPC | 178 } // namespace IPC |
| 169 | 179 |
| 170 #endif // PPAPI_PROXY_PPAPI_PARAM_TRAITS_H_ | 180 #endif // PPAPI_PROXY_PPAPI_PARAM_TRAITS_H_ |
| OLD | NEW |