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

Side by Side Diff: ui/events/gesture_detection/motion_event.h

Issue 282593002: Reland Unified Gesture Recognizer for Aura (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase again... Created 6 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_GESTURE_DETECTION_MOTION_EVENT_H_ 5 #ifndef UI_EVENTS_GESTURE_DETECTION_MOTION_EVENT_H_
6 #define UI_EVENTS_GESTURE_DETECTION_MOTION_EVENT_H_ 6 #define UI_EVENTS_GESTURE_DETECTION_MOTION_EVENT_H_
7 7
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/time/time.h" 9 #include "base/time/time.h"
10 #include "ui/events/gesture_detection/gesture_detection_export.h" 10 #include "ui/events/gesture_detection/gesture_detection_export.h"
(...skipping 13 matching lines...) Expand all
24 ACTION_POINTER_UP, 24 ACTION_POINTER_UP,
25 }; 25 };
26 26
27 // The implementer promises that |GetPointerId()| will never exceed this. 27 // The implementer promises that |GetPointerId()| will never exceed this.
28 enum { MAX_POINTER_ID = 31 }; 28 enum { MAX_POINTER_ID = 31 };
29 29
30 virtual ~MotionEvent() {} 30 virtual ~MotionEvent() {}
31 31
32 virtual int GetId() const = 0; 32 virtual int GetId() const = 0;
33 virtual Action GetAction() const = 0; 33 virtual Action GetAction() const = 0;
34 // Only valid if |GetAction()| returns ACTION_POINTER_UP or
35 // ACTION_POINTER_DOWN.
34 virtual int GetActionIndex() const = 0; 36 virtual int GetActionIndex() const = 0;
35 virtual size_t GetPointerCount() const = 0; 37 virtual size_t GetPointerCount() const = 0;
36 virtual int GetPointerId(size_t pointer_index) const = 0; 38 virtual int GetPointerId(size_t pointer_index) const = 0;
37 virtual float GetX(size_t pointer_index) const = 0; 39 virtual float GetX(size_t pointer_index) const = 0;
38 virtual float GetY(size_t pointer_index) const = 0; 40 virtual float GetY(size_t pointer_index) const = 0;
39 virtual float GetTouchMajor(size_t pointer_index) const = 0; 41 virtual float GetTouchMajor(size_t pointer_index) const = 0;
40 virtual float GetPressure(size_t pointer_index) const = 0; 42 virtual float GetPressure(size_t pointer_index) const = 0;
41 virtual base::TimeTicks GetEventTime() const = 0; 43 virtual base::TimeTicks GetEventTime() const = 0;
42 44
43 virtual size_t GetHistorySize() const = 0; 45 virtual size_t GetHistorySize() const = 0;
(...skipping 14 matching lines...) Expand all
58 float GetY() const { return GetY(0); } 60 float GetY() const { return GetY(0); }
59 float GetRawX() const { return GetX(); } 61 float GetRawX() const { return GetX(); }
60 float GetRawY() const { return GetY(); } 62 float GetRawY() const { return GetY(); }
61 float GetTouchMajor() const { return GetTouchMajor(0); } 63 float GetTouchMajor() const { return GetTouchMajor(0); }
62 float GetPressure() const { return GetPressure(0); } 64 float GetPressure() const { return GetPressure(0); }
63 }; 65 };
64 66
65 } // namespace ui 67 } // namespace ui
66 68
67 #endif // UI_EVENTS_GESTURE_DETECTION_MOTION_EVENT_H_ 69 #endif // UI_EVENTS_GESTURE_DETECTION_MOTION_EVENT_H_
OLDNEW
« no previous file with comments | « ui/events/gesture_detection/gesture_config_helper_aura.cc ('k') | ui/events/gestures/gesture_configuration.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698