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

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: Fix Mac. 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
« no previous file with comments | « ui/events/gestures/gesture_recognizer.h ('k') | ui/events/gestures/gesture_recognizer_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 TransferEventsTo(GestureConsumer* current_consumer,
47 GestureConsumer* new_consumer) override; 53 GestureConsumer* new_consumer,
54 ShouldCancelTouches should_cancel_touches) override;
48 bool GetLastTouchPointForTarget(GestureConsumer* consumer, 55 bool GetLastTouchPointForTarget(GestureConsumer* consumer,
49 gfx::PointF* point) override; 56 gfx::PointF* point) override;
50 bool CancelActiveTouches(GestureConsumer* consumer) override; 57 bool CancelActiveTouches(GestureConsumer* consumer) override;
51 58
52 protected: 59 protected:
53 virtual GestureProviderAura* GetGestureProviderForConsumer( 60 virtual GestureProviderAura* GetGestureProviderForConsumer(
54 GestureConsumer* c); 61 GestureConsumer* c);
55 62
56 private: 63 private:
57 // Sets up the target consumer for gestures based on the touch-event. 64 // 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); 98 DISALLOW_COPY_AND_ASSIGN(GestureRecognizerImpl);
92 }; 99 };
93 100
94 // Provided only for testing: 101 // Provided only for testing:
95 EVENTS_EXPORT void SetGestureRecognizerForTesting( 102 EVENTS_EXPORT void SetGestureRecognizerForTesting(
96 GestureRecognizer* gesture_recognizer); 103 GestureRecognizer* gesture_recognizer);
97 104
98 } // namespace ui 105 } // namespace ui
99 106
100 #endif // UI_EVENTS_GESTURES_GESTURE_RECOGNIZER_IMPL_H_ 107 #endif // UI_EVENTS_GESTURES_GESTURE_RECOGNIZER_IMPL_H_
OLDNEW
« no previous file with comments | « ui/events/gestures/gesture_recognizer.h ('k') | ui/events/gestures/gesture_recognizer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698