Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(720)

Side by Side Diff: components/mus/common/event_param_traits.h

Issue 1975533002: Change ui::Event::time_stamp from TimeDelta to TimeTicks (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merge master Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698