| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 // This file defines IPC::ParamTraits<> specializations for several | 5 // This file defines IPC::ParamTraits<> specializations for several |
| 6 // input-related types that require manual serialiation code. | 6 // input-related types that require manual serialiation code. |
| 7 | 7 |
| 8 #ifndef CONTENT_COMMON_INPUT_INPUT_PARAM_TRAITS_H_ | 8 #ifndef CONTENT_COMMON_INPUT_INPUT_PARAM_TRAITS_H_ |
| 9 #define CONTENT_COMMON_INPUT_INPUT_PARAM_TRAITS_H_ | 9 #define CONTENT_COMMON_INPUT_INPUT_PARAM_TRAITS_H_ |
| 10 | 10 |
| 11 #include "content/common/content_export.h" | 11 #include "content/common/content_export.h" |
| 12 #include "content/common/content_param_traits_macros.h" | 12 #include "content/common/content_param_traits_macros.h" |
| 13 #include "content/common/input/scoped_web_input_event.h" | |
| 14 #include "content/common/input/synthetic_gesture_packet.h" | 13 #include "content/common/input/synthetic_gesture_packet.h" |
| 15 | 14 |
| 16 namespace IPC { | 15 namespace IPC { |
| 17 | 16 |
| 18 template <> | |
| 19 struct CONTENT_EXPORT ParamTraits<content::ScopedWebInputEvent> { | |
| 20 typedef content::ScopedWebInputEvent param_type; | |
| 21 static void Write(Message* m, const param_type& p); | |
| 22 static bool Read(const Message* m, base::PickleIterator* iter, param_type* r); | |
| 23 static void Log(const param_type& p, std::string* l); | |
| 24 }; | |
| 25 | |
| 26 template<> | 17 template<> |
| 27 struct CONTENT_EXPORT ParamTraits<content::SyntheticGesturePacket> { | 18 struct CONTENT_EXPORT ParamTraits<content::SyntheticGesturePacket> { |
| 28 typedef content::SyntheticGesturePacket param_type; | 19 typedef content::SyntheticGesturePacket param_type; |
| 29 static void Write(Message* m, const param_type& p); | 20 static void Write(Message* m, const param_type& p); |
| 30 static bool Read(const Message* m, base::PickleIterator* iter, param_type* r); | 21 static bool Read(const Message* m, base::PickleIterator* iter, param_type* r); |
| 31 static void Log(const param_type& p, std::string* l); | 22 static void Log(const param_type& p, std::string* l); |
| 32 }; | 23 }; |
| 33 | 24 |
| 34 } // namespace IPC | 25 } // namespace IPC |
| 35 | 26 |
| 36 #endif // CONTENT_COMMON_INPUT_INPUT_PARAM_TRAITS_H_ | 27 #endif // CONTENT_COMMON_INPUT_INPUT_PARAM_TRAITS_H_ |
| OLD | NEW |