OLD | NEW |
1 // Copyright (c) 2016 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2016 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 COMPONENTS_MUS_COMMON_EVENT_PARAM_TRAITS_H_ | 5 #ifndef COMPONENTS_MUS_COMMON_EVENT_PARAM_TRAITS_H_ |
6 #define COMPONENTS_MUS_COMMON_EVENT_PARAM_TRAITS_H_ | 6 #define COMPONENTS_MUS_COMMON_EVENT_PARAM_TRAITS_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "components/mus/common/event_param_traits_macros.h" | 10 #include "components/mus/common/event_param_traits_macros.h" |
(...skipping 25 matching lines...) Expand all Loading... |
36 struct MUS_COMMON_EXPORT ParamTraits<ui::ScopedEvent> { | 36 struct MUS_COMMON_EXPORT ParamTraits<ui::ScopedEvent> { |
37 typedef ui::ScopedEvent param_type; | 37 typedef ui::ScopedEvent param_type; |
38 static void GetSize(base::PickleSizer* s, const param_type& p); | 38 static void GetSize(base::PickleSizer* s, const param_type& p); |
39 static void Write(base::Pickle* m, const param_type& p); | 39 static void Write(base::Pickle* m, const param_type& p); |
40 static bool Read(const base::Pickle* m, | 40 static bool Read(const base::Pickle* m, |
41 base::PickleIterator* iter, | 41 base::PickleIterator* iter, |
42 param_type* p); | 42 param_type* p); |
43 static void Log(const param_type& p, std::string* l); | 43 static void Log(const param_type& p, std::string* l); |
44 | 44 |
45 static void SizeEvent(ui::EventType type, | 45 static void SizeEvent(ui::EventType type, |
46 base::TimeDelta time_stamp, | 46 base::TimeTicks time_stamp, |
47 int flags, | 47 int flags, |
48 base::PickleSizer* s, | 48 base::PickleSizer* s, |
49 const ui::ScopedEvent& p); | 49 const ui::ScopedEvent& p); |
50 static void WriteEvent(ui::EventType type, | 50 static void WriteEvent(ui::EventType type, |
51 base::TimeDelta time_stamp, | 51 base::TimeTicks time_stamp, |
52 int flags, | 52 int flags, |
53 base::Pickle* m, | 53 base::Pickle* m, |
54 const ui::ScopedEvent& p); | 54 const ui::ScopedEvent& p); |
55 static bool ReadEvent(ui::EventType type, | 55 static bool ReadEvent(ui::EventType type, |
56 base::TimeDelta time_stamp, | 56 base::TimeTicks time_stamp, |
57 int flags, | 57 int flags, |
58 const base::Pickle* m, | 58 const base::Pickle* m, |
59 base::PickleIterator* iter, | 59 base::PickleIterator* iter, |
60 ui::ScopedEvent* p); | 60 ui::ScopedEvent* p); |
61 static void LogEvent(ui::EventType type, | 61 static void LogEvent(ui::EventType type, |
62 base::TimeDelta time_stamp, | 62 base::TimeTicks time_stamp, |
63 int flags, | 63 int flags, |
64 const ui::ScopedEvent& p, | 64 const ui::ScopedEvent& p, |
65 std::string* l); | 65 std::string* l); |
66 }; | 66 }; |
67 | 67 |
68 // Manually implements no-op implementation for ui::CancelModeEvent because IPC | 68 // Manually implements no-op implementation for ui::CancelModeEvent because IPC |
69 // BEGIN/END macros with no MEMBER or PARENT in between cause compiler | 69 // BEGIN/END macros with no MEMBER or PARENT in between cause compiler |
70 // errors. | 70 // errors. |
71 template <> | 71 template <> |
72 struct ParamTraits<ui::CancelModeEvent> { | 72 struct ParamTraits<ui::CancelModeEvent> { |
(...skipping 13 matching lines...) Expand all Loading... |
86 static void Write(base::Pickle* m, const param_type& p); | 86 static void Write(base::Pickle* m, const param_type& p); |
87 static bool Read(const base::Pickle* m, | 87 static bool Read(const base::Pickle* m, |
88 base::PickleIterator* iter, | 88 base::PickleIterator* iter, |
89 param_type* p); | 89 param_type* p); |
90 static void Log(const param_type& p, std::string* l); | 90 static void Log(const param_type& p, std::string* l); |
91 }; | 91 }; |
92 | 92 |
93 } // namespace IPC | 93 } // namespace IPC |
94 | 94 |
95 #endif // COMPONENTS_MUS_COMMON_EVENT_PARAM_TRAITS_H_ | 95 #endif // COMPONENTS_MUS_COMMON_EVENT_PARAM_TRAITS_H_ |
OLD | NEW |