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

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

Issue 1907323003: Drag and drop cleans up touch sequences from the source window. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update GR state without actually dispatching press events. Created 4 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
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_EVENTS_GESTURES_GESTURE_RECOGNIZER_IMPL_H_ 5 #ifndef UI_EVENTS_GESTURES_GESTURE_RECOGNIZER_IMPL_H_
6 #define UI_EVENTS_GESTURES_GESTURE_RECOGNIZER_IMPL_H_ 6 #define UI_EVENTS_GESTURES_GESTURE_RECOGNIZER_IMPL_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <map> 10 #include <map>
(...skipping 20 matching lines...) Expand all
31 class EVENTS_EXPORT GestureRecognizerImpl : public GestureRecognizer, 31 class EVENTS_EXPORT GestureRecognizerImpl : public GestureRecognizer,
32 public GestureProviderAuraClient { 32 public GestureProviderAuraClient {
33 public: 33 public:
34 typedef std::map<int, GestureConsumer*> TouchIdToConsumerMap; 34 typedef std::map<int, GestureConsumer*> TouchIdToConsumerMap;
35 35
36 GestureRecognizerImpl(); 36 GestureRecognizerImpl();
37 ~GestureRecognizerImpl() override; 37 ~GestureRecognizerImpl() override;
38 38
39 std::vector<GestureEventHelper*>& helpers() { return helpers_; } 39 std::vector<GestureEventHelper*>& helpers() { return helpers_; }
40 40
41 // Returns a list of events of type |type|, one for each pointer down on
42 // |consumer|. Event locations are pulled from the active pointers.
43 std::vector<std::unique_ptr<TouchEvent>> GetEventPerPointForConsumer(
44 GestureConsumer* consumer,
45 EventType type);
46
41 // Overridden from GestureRecognizer 47 // Overridden from GestureRecognizer
42 GestureConsumer* GetTouchLockedTarget(const TouchEvent& event) override; 48 GestureConsumer* GetTouchLockedTarget(const TouchEvent& event) override;
43 GestureConsumer* GetTargetForLocation(const gfx::PointF& location, 49 GestureConsumer* GetTargetForLocation(const gfx::PointF& location,
44 int source_device_id) override; 50 int source_device_id) override;
45 void CancelActiveTouchesExcept(GestureConsumer* not_cancelled) override; 51 void CancelActiveTouchesExcept(GestureConsumer* not_cancelled) override;
46 void TransferEventsTo(GestureConsumer* current_consumer, 52 void BeginDragAndDrop(GestureConsumer* current_consumer,
47 GestureConsumer* new_consumer) override; 53 GestureConsumer* new_consumer) override;
54 void BeginTabDrag(GestureConsumer* current_consumer,
55 GestureConsumer* new_consumer) override;
48 bool GetLastTouchPointForTarget(GestureConsumer* consumer, 56 bool GetLastTouchPointForTarget(GestureConsumer* consumer,
49 gfx::PointF* point) override; 57 gfx::PointF* point) override;
50 bool CancelActiveTouches(GestureConsumer* consumer) override; 58 bool CancelActiveTouches(GestureConsumer* consumer) override;
51 59
52 protected: 60 protected:
53 virtual GestureProviderAura* GetGestureProviderForConsumer( 61 virtual GestureProviderAura* GetGestureProviderForConsumer(
54 GestureConsumer* c); 62 GestureConsumer* c);
55 63
56 private: 64 private:
57 // Sets up the target consumer for gestures based on the touch-event. 65 // Sets up the target consumer for gestures based on the touch-event.
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 DISALLOW_COPY_AND_ASSIGN(GestureRecognizerImpl); 99 DISALLOW_COPY_AND_ASSIGN(GestureRecognizerImpl);
92 }; 100 };
93 101
94 // Provided only for testing: 102 // Provided only for testing:
95 EVENTS_EXPORT void SetGestureRecognizerForTesting( 103 EVENTS_EXPORT void SetGestureRecognizerForTesting(
96 GestureRecognizer* gesture_recognizer); 104 GestureRecognizer* gesture_recognizer);
97 105
98 } // namespace ui 106 } // namespace ui
99 107
100 #endif // UI_EVENTS_GESTURES_GESTURE_RECOGNIZER_IMPL_H_ 108 #endif // UI_EVENTS_GESTURES_GESTURE_RECOGNIZER_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698