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

Side by Side Diff: ui/aura/gestures/gesture_sequence.h

Issue 9452024: Gestures are now possible using touch events with any ids (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Allow consecutive touch presses with the same touch-id. Created 8 years, 9 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_AURA_GESTURES_GESTURE_SEQUENCE_H_ 5 #ifndef UI_AURA_GESTURES_GESTURE_SEQUENCE_H_
6 #define UI_AURA_GESTURES_GESTURE_SEQUENCE_H_ 6 #define UI_AURA_GESTURES_GESTURE_SEQUENCE_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/timer.h" 9 #include "base/timer.h"
10 #include "ui/aura/gestures/gesture_point.h" 10 #include "ui/aura/gestures/gesture_point.h"
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 virtual base::OneShotTimer<GestureSequence>* CreateTimer(); 48 virtual base::OneShotTimer<GestureSequence>* CreateTimer();
49 base::OneShotTimer<GestureSequence>* long_press_timer() { 49 base::OneShotTimer<GestureSequence>* long_press_timer() {
50 return long_press_timer_.get(); 50 return long_press_timer_.get();
51 } 51 }
52 52
53 private: 53 private:
54 void Reset(); 54 void Reset();
55 55
56 GesturePoint& GesturePointForEvent(const TouchEvent& event); 56 GesturePoint& GesturePointForEvent(const TouchEvent& event);
57 57
58 // Functions to be called to add GestureEvents, after succesful recognition. 58 // Do a linear scan through points_ to find the GesturePoint
59 // with id |point_id|.
60 GesturePoint* GetPointByPointId(int point_id);
61
62 // Functions to be called to add GestureEvents, after successful recognition.
59 63
60 // Tap gestures. 64 // Tap gestures.
61 void AppendTapDownGestureEvent(const GesturePoint& point, Gestures* gestures); 65 void AppendTapDownGestureEvent(const GesturePoint& point, Gestures* gestures);
62 void AppendClickGestureEvent(const GesturePoint& point, Gestures* gestures); 66 void AppendClickGestureEvent(const GesturePoint& point, Gestures* gestures);
63 void AppendDoubleClickGestureEvent(const GesturePoint& point, 67 void AppendDoubleClickGestureEvent(const GesturePoint& point,
64 Gestures* gestures); 68 Gestures* gestures);
65 void AppendLongPressGestureEvent(); 69 void AppendLongPressGestureEvent();
66 70
67 // Scroll gestures. 71 // Scroll gestures.
68 void AppendScrollGestureBegin(const GesturePoint& point, 72 void AppendScrollGestureBegin(const GesturePoint& point,
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 int point_count_; 152 int point_count_;
149 153
150 RootWindow* root_window_; 154 RootWindow* root_window_;
151 155
152 DISALLOW_COPY_AND_ASSIGN(GestureSequence); 156 DISALLOW_COPY_AND_ASSIGN(GestureSequence);
153 }; 157 };
154 158
155 } // namespace aura 159 } // namespace aura
156 160
157 #endif // UI_AURA_GESTURES_GESTURE_SEQUENCE_H_ 161 #endif // UI_AURA_GESTURES_GESTURE_SEQUENCE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698