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

Side by Side Diff: ui/events/base_event_utils.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: Fix gesture recognizer tests Created 4 years, 7 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 UI_EVENTS_BASE_EVENT_UTILS_H_ 5 #ifndef UI_EVENTS_BASE_EVENT_UTILS_H_
6 #define UI_EVENTS_BASE_EVENT_UTILS_H_ 6 #define UI_EVENTS_BASE_EVENT_UTILS_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include "ui/events/events_base_export.h" 10 #include "ui/events/events_base_export.h"
11 11
12 namespace base {
13 class TimeTicks;
14 }
15
12 // Common functions to be used for all platforms. 16 // Common functions to be used for all platforms.
13 namespace ui { 17 namespace ui {
14 18
15 // Generate an unique identifier for events. 19 // Generate an unique identifier for events.
16 EVENTS_BASE_EXPORT uint32_t GetNextTouchEventId(); 20 EVENTS_BASE_EXPORT uint32_t GetNextTouchEventId();
17 21
18 // Checks if |flags| contains system key modifiers. 22 // Checks if |flags| contains system key modifiers.
19 EVENTS_BASE_EXPORT bool IsSystemKeyModifier(int flags); 23 EVENTS_BASE_EXPORT bool IsSystemKeyModifier(int flags);
20 24
25 EVENTS_BASE_EXPORT double EventTimeStampToSeconds(base::TimeTicks time_stamp);
miu 2016/05/16 20:05:35 Please add some comments to explain the usage of t
majidvp 2016/05/21 01:38:00 I will add a comment. As you mentioned these shoul
miu 2016/05/25 01:42:31 IIRC, mojo includes a serializer for the base::Tim
majidvp 2016/05/27 14:34:15 Mojo has convertor for TimeTicks but we are conver
26 EVENTS_BASE_EXPORT base::TimeTicks EventTimeStampFromSeconds(
27 double time_stamp_seconds);
28
21 } // namespace ui 29 } // namespace ui
22 30
23 #endif // UI_EVENTS_BASE_EVENT_UTILS_H_ 31 #endif // UI_EVENTS_BASE_EVENT_UTILS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698