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

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: rebase 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
« no previous file with comments | « ui/chromeos/touch_exploration_controller_unittest.cc ('k') | ui/events/base_event_utils.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 // Converts an event timestamp ticks to seconds (floating point representation).
26 // WARNING: This should only be used when interfacing with platform code that
27 // does not use base::Time* types.
28 EVENTS_BASE_EXPORT double EventTimeStampToSeconds(base::TimeTicks time_stamp);
29
30 // Converts an event timestamp in seconds to TimeTicks.
31 // WARNING: This should only be used when interfacing with platform code that
32 // does not use base::Time* types.
33 EVENTS_BASE_EXPORT base::TimeTicks EventTimeStampFromSeconds(
34 double time_stamp_seconds);
35
21 } // namespace ui 36 } // namespace ui
22 37
23 #endif // UI_EVENTS_BASE_EVENT_UTILS_H_ 38 #endif // UI_EVENTS_BASE_EVENT_UTILS_H_
OLDNEW
« no previous file with comments | « ui/chromeos/touch_exploration_controller_unittest.cc ('k') | ui/events/base_event_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698