| 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_input_event.h" |
| 14 #include "ppapi/c/pp_rect.h" | 15 #include "ppapi/c/pp_rect.h" |
| 15 #include "ppapi/c/pp_var.h" | 16 #include "ppapi/c/pp_var.h" |
| 16 | 17 |
| 17 struct PP_FileInfo; | 18 struct PP_FileInfo; |
| 18 struct PP_ObjectProperty; | 19 struct PP_ObjectProperty; |
| 19 struct PP_Flash_Menu; | 20 struct PP_Flash_Menu; |
| 20 struct PP_Flash_NetAddress; | 21 struct PP_Flash_NetAddress; |
| 21 | 22 |
| 22 namespace pp { | 23 namespace pp { |
| 23 namespace proxy { | 24 namespace proxy { |
| (...skipping 30 matching lines...) Expand all Loading... |
| 54 | 55 |
| 55 template <> | 56 template <> |
| 56 struct ParamTraits<PP_Flash_NetAddress> { | 57 struct ParamTraits<PP_Flash_NetAddress> { |
| 57 typedef PP_Flash_NetAddress param_type; | 58 typedef PP_Flash_NetAddress param_type; |
| 58 static void Write(Message* m, const param_type& p); | 59 static void Write(Message* m, const param_type& p); |
| 59 static bool Read(const Message* m, void** iter, param_type* p); | 60 static bool Read(const Message* m, void** iter, param_type* p); |
| 60 static void Log(const param_type& p, std::string* l); | 61 static void Log(const param_type& p, std::string* l); |
| 61 }; | 62 }; |
| 62 | 63 |
| 63 template<> | 64 template<> |
| 65 struct ParamTraits<PP_InputEvent> { |
| 66 typedef PP_InputEvent param_type; |
| 67 static void Write(Message* m, const param_type& p); |
| 68 static bool Read(const Message* m, void** iter, param_type* r); |
| 69 static void Log(const param_type& p, std::string* l); |
| 70 }; |
| 71 |
| 72 template<> |
| 64 struct ParamTraits<PP_ObjectProperty> { | 73 struct ParamTraits<PP_ObjectProperty> { |
| 65 typedef PP_ObjectProperty param_type; | 74 typedef PP_ObjectProperty param_type; |
| 66 static void Write(Message* m, const param_type& p); | 75 static void Write(Message* m, const param_type& p); |
| 67 static bool Read(const Message* m, void** iter, param_type* r); | 76 static bool Read(const Message* m, void** iter, param_type* r); |
| 68 static void Log(const param_type& p, std::string* l); | 77 static void Log(const param_type& p, std::string* l); |
| 69 }; | 78 }; |
| 70 | 79 |
| 71 template<> | 80 template<> |
| 72 struct ParamTraits<pp::proxy::PPBFlash_DrawGlyphs_Params> { | 81 struct ParamTraits<pp::proxy::PPBFlash_DrawGlyphs_Params> { |
| 73 typedef pp::proxy::PPBFlash_DrawGlyphs_Params param_type; | 82 typedef pp::proxy::PPBFlash_DrawGlyphs_Params param_type; |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 144 struct ParamTraits<pp::proxy::SerializedFlashMenu> { | 153 struct ParamTraits<pp::proxy::SerializedFlashMenu> { |
| 145 typedef pp::proxy::SerializedFlashMenu param_type; | 154 typedef pp::proxy::SerializedFlashMenu param_type; |
| 146 static void Write(Message* m, const param_type& p); | 155 static void Write(Message* m, const param_type& p); |
| 147 static bool Read(const Message* m, void** iter, param_type* r); | 156 static bool Read(const Message* m, void** iter, param_type* r); |
| 148 static void Log(const param_type& p, std::string* l); | 157 static void Log(const param_type& p, std::string* l); |
| 149 }; | 158 }; |
| 150 | 159 |
| 151 } // namespace IPC | 160 } // namespace IPC |
| 152 | 161 |
| 153 #endif // PPAPI_PROXY_PPAPI_PARAM_TRAITS_H_ | 162 #endif // PPAPI_PROXY_PPAPI_PARAM_TRAITS_H_ |
| OLD | NEW |