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

Side by Side Diff: components/exo/touch_delegate.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 | « components/exo/pointer_unittest.cc ('k') | components/exo/touch_unittest.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 COMPONENTS_EXO_TOUCH_DELEGATE_H_ 5 #ifndef COMPONENTS_EXO_TOUCH_DELEGATE_H_
6 #define COMPONENTS_EXO_TOUCH_DELEGATE_H_ 6 #define COMPONENTS_EXO_TOUCH_DELEGATE_H_
7 7
8 #include "base/time/time.h" 8 #include "base/time/time.h"
9 9
10 namespace gfx { 10 namespace gfx {
(...skipping 13 matching lines...) Expand all
24 24
25 // This should return true if |surface| is a valid target for this touch 25 // This should return true if |surface| is a valid target for this touch
26 // device. E.g. the surface is owned by the same client as the touch device. 26 // device. E.g. the surface is owned by the same client as the touch device.
27 virtual bool CanAcceptTouchEventsForSurface(Surface* surface) const = 0; 27 virtual bool CanAcceptTouchEventsForSurface(Surface* surface) const = 0;
28 28
29 // Called when a new touch point has appeared on the surface. This touch 29 // Called when a new touch point has appeared on the surface. This touch
30 // point is assigned a unique ID. Future events from this touch point 30 // point is assigned a unique ID. Future events from this touch point
31 // reference this ID. |location| is the initial location of touch point 31 // reference this ID. |location| is the initial location of touch point
32 // relative to the origin of the surface. 32 // relative to the origin of the surface.
33 virtual void OnTouchDown(Surface* surface, 33 virtual void OnTouchDown(Surface* surface,
34 base::TimeDelta time_stamp, 34 base::TimeTicks time_stamp,
35 int id, 35 int id,
36 const gfx::Point& location) = 0; 36 const gfx::Point& location) = 0;
37 37
38 // Called when a touch point has disappeared. No further events will be sent 38 // Called when a touch point has disappeared. No further events will be sent
39 // for this touch point. 39 // for this touch point.
40 virtual void OnTouchUp(base::TimeDelta time_stamp, int id) = 0; 40 virtual void OnTouchUp(base::TimeTicks time_stamp, int id) = 0;
41 41
42 // Called when a touch point has changed coordinates. 42 // Called when a touch point has changed coordinates.
43 virtual void OnTouchMotion(base::TimeDelta time_stamp, 43 virtual void OnTouchMotion(base::TimeTicks time_stamp,
44 int id, 44 int id,
45 const gfx::Point& location) = 0; 45 const gfx::Point& location) = 0;
46 46
47 // Called when the touch session has been canceled. Touch cancellation 47 // Called when the touch session has been canceled. Touch cancellation
48 // applies to all touch points currently active. 48 // applies to all touch points currently active.
49 virtual void OnTouchCancel() = 0; 49 virtual void OnTouchCancel() = 0;
50 50
51 protected: 51 protected:
52 virtual ~TouchDelegate() {} 52 virtual ~TouchDelegate() {}
53 }; 53 };
54 54
55 } // namespace exo 55 } // namespace exo
56 56
57 #endif // COMPONENTS_EXO_TOUCH_DELEGATE_H_ 57 #endif // COMPONENTS_EXO_TOUCH_DELEGATE_H_
OLDNEW
« no previous file with comments | « components/exo/pointer_unittest.cc ('k') | components/exo/touch_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698