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

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

Issue 349463002: [Android] Map raw touch coordinates to global gesture locations (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix win compilation Created 6 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 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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 size_t historical_index) const = 0; 55 size_t historical_index) const = 0;
56 56
57 virtual scoped_ptr<MotionEvent> Clone() const = 0; 57 virtual scoped_ptr<MotionEvent> Clone() const = 0;
58 virtual scoped_ptr<MotionEvent> Cancel() const = 0; 58 virtual scoped_ptr<MotionEvent> Cancel() const = 0;
59 59
60 // Utility accessor methods for convenience. 60 // Utility accessor methods for convenience.
61 float GetX() const { return GetX(0); } 61 float GetX() const { return GetX(0); }
62 float GetY() const { return GetY(0); } 62 float GetY() const { return GetY(0); }
63 float GetRawX() const { return GetRawX(0); } 63 float GetRawX() const { return GetRawX(0); }
64 float GetRawY() const { return GetRawY(0); } 64 float GetRawY() const { return GetRawY(0); }
65 float GetRawOffsetX() const { return GetRawX() - GetX(); }
66 float GetRawOffsetY() const { return GetRawY() - GetY(); }
65 float GetTouchMajor() const { return GetTouchMajor(0); } 67 float GetTouchMajor() const { return GetTouchMajor(0); }
66 float GetPressure() const { return GetPressure(0); } 68 float GetPressure() const { return GetPressure(0); }
67 }; 69 };
68 70
69 } // namespace ui 71 } // namespace ui
70 72
71 #endif // UI_EVENTS_GESTURE_DETECTION_MOTION_EVENT_H_ 73 #endif // UI_EVENTS_GESTURE_DETECTION_MOTION_EVENT_H_
OLDNEW
« no previous file with comments | « ui/events/gesture_detection/mock_motion_event.cc ('k') | ui/events/gesture_detection/touch_disposition_gesture_filter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698