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

Side by Side Diff: ui/events/gestures/gesture_provider_aura.h

Issue 680413006: Re-enable Eager Gesture Recognition on Aura (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix out of order ack problem. Created 6 years, 1 month 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_UI_GESTURE_PROVIDER_H_ 5 #ifndef UI_EVENTS_GESTURE_DETECTION_UI_GESTURE_PROVIDER_H_
6 #define UI_EVENTS_GESTURE_DETECTION_UI_GESTURE_PROVIDER_H_ 6 #define UI_EVENTS_GESTURE_DETECTION_UI_GESTURE_PROVIDER_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/memory/scoped_vector.h" 9 #include "base/memory/scoped_vector.h"
10 #include "ui/events/event.h" 10 #include "ui/events/event.h"
(...skipping 13 matching lines...) Expand all
24 24
25 // Provides gesture detection and dispatch given a sequence of touch events 25 // Provides gesture detection and dispatch given a sequence of touch events
26 // and touch event acks. 26 // and touch event acks.
27 class EVENTS_EXPORT GestureProviderAura : public GestureProviderClient { 27 class EVENTS_EXPORT GestureProviderAura : public GestureProviderClient {
28 public: 28 public:
29 GestureProviderAura(GestureProviderAuraClient* client); 29 GestureProviderAura(GestureProviderAuraClient* client);
30 ~GestureProviderAura() override; 30 ~GestureProviderAura() override;
31 31
32 bool OnTouchEvent(const TouchEvent& event); 32 bool OnTouchEvent(const TouchEvent& event);
33 void OnTouchEventAck(bool event_consumed); 33 void OnTouchEventAck(bool event_consumed);
34 // Call if the most recent event passed to |OnTouchEvent| was
35 // invalid, to indicate that this event should be ignored.
36 void IgnoreLastTouchEvent();
34 const MotionEventAura& pointer_state() { return pointer_state_; } 37 const MotionEventAura& pointer_state() { return pointer_state_; }
35 ScopedVector<GestureEvent>* GetAndResetPendingGestures(); 38 ScopedVector<GestureEvent>* GetAndResetPendingGestures();
36 39
37 // GestureProviderClient implementation 40 // GestureProviderClient implementation
38 void OnGestureEvent(const GestureEventData& gesture) override; 41 void OnGestureEvent(const GestureEventData& gesture) override;
39 42
40 private: 43 private:
41 bool IsConsideredDoubleTap(const GestureEventData& previous_tap, 44 bool IsConsideredDoubleTap(const GestureEventData& previous_tap,
42 const GestureEventData& current_tap) const; 45 const GestureEventData& current_tap) const;
43 46
44 scoped_ptr<GestureEventData> previous_tap_; 47 scoped_ptr<GestureEventData> previous_tap_;
45 48
46 GestureProviderAuraClient* client_; 49 GestureProviderAuraClient* client_;
47 MotionEventAura pointer_state_; 50 MotionEventAura pointer_state_;
48 FilteredGestureProvider filtered_gesture_provider_; 51 FilteredGestureProvider filtered_gesture_provider_;
49 52
50 ui::LatencyInfo last_touch_event_latency_info_; 53 ui::LatencyInfo last_touch_event_latency_info_;
51 bool handling_event_; 54 bool handling_event_;
52 ScopedVector<GestureEvent> pending_gestures_; 55 ScopedVector<GestureEvent> pending_gestures_;
53 56
54 DISALLOW_COPY_AND_ASSIGN(GestureProviderAura); 57 DISALLOW_COPY_AND_ASSIGN(GestureProviderAura);
55 }; 58 };
56 59
57 } // namespace ui 60 } // namespace ui
58 61
59 #endif // UI_EVENTS_GESTURE_DETECTION_UI_GESTURE_PROVIDER_H_ 62 #endif // UI_EVENTS_GESTURE_DETECTION_UI_GESTURE_PROVIDER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698