| OLD | NEW | 
|---|
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 CONTENT_COMMON_GAMEPAD_PARAM_TRAITS_H_ | 5 #ifndef CONTENT_COMMON_GAMEPAD_PARAM_TRAITS_H_ | 
| 6 #define CONTENT_COMMON_GAMEPAD_PARAM_TRAITS_H_ | 6 #define CONTENT_COMMON_GAMEPAD_PARAM_TRAITS_H_ | 
| 7 | 7 | 
| 8 #include <string> | 8 #include <string> | 
| 9 | 9 | 
| 10 #include "ipc/ipc_param_traits.h" | 10 #include "ipc/ipc_param_traits.h" | 
| 11 | 11 | 
| 12 namespace base { | 12 namespace base { | 
|  | 13 class Pickle; | 
| 13 class PickleIterator; | 14 class PickleIterator; | 
| 14 } | 15 } | 
| 15 | 16 | 
| 16 namespace blink { class WebGamepad; } | 17 namespace blink { class WebGamepad; } | 
| 17 | 18 | 
| 18 namespace IPC { | 19 namespace IPC { | 
| 19 | 20 | 
| 20 class Message; | 21 class Message; | 
| 21 | 22 | 
| 22 template <> | 23 template <> | 
| 23 struct ParamTraits<blink::WebGamepad> { | 24 struct ParamTraits<blink::WebGamepad> { | 
| 24   typedef blink::WebGamepad param_type; | 25   typedef blink::WebGamepad param_type; | 
| 25   static void Write(Message* m, const blink::WebGamepad& p); | 26   static void Write(base::Pickle* m, const blink::WebGamepad& p); | 
| 26   static bool Read(const Message* m, | 27   static bool Read(const base::Pickle* m, | 
| 27                    base::PickleIterator* iter, | 28                    base::PickleIterator* iter, | 
| 28                    blink::WebGamepad* p); | 29                    blink::WebGamepad* p); | 
| 29   static void Log(const blink::WebGamepad& p, std::string* l); | 30   static void Log(const blink::WebGamepad& p, std::string* l); | 
| 30 }; | 31 }; | 
| 31 | 32 | 
| 32 } // namespace IPC | 33 } // namespace IPC | 
| 33 | 34 | 
| 34 #endif  // CONTENT_COMMON_GAMEPAD_PARAM_TRAITS_H_ | 35 #endif  // CONTENT_COMMON_GAMEPAD_PARAM_TRAITS_H_ | 
| OLD | NEW | 
|---|