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

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

Issue 2628393003: Remove ScopedVector from ui/events/. (Closed)
Patch Set: chromeos2 Created 3 years, 11 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_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 <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory>
11 #include <vector>
12
10 #include "base/macros.h" 13 #include "base/macros.h"
11 #include "base/memory/scoped_vector.h"
12 #include "ui/events/event.h" 14 #include "ui/events/event.h"
13 #include "ui/events/events_export.h" 15 #include "ui/events/events_export.h"
14 #include "ui/events/gesture_detection/filtered_gesture_provider.h" 16 #include "ui/events/gesture_detection/filtered_gesture_provider.h"
15 #include "ui/events/gesture_detection/gesture_event_data_packet.h" 17 #include "ui/events/gesture_detection/gesture_event_data_packet.h"
16 #include "ui/events/gesture_detection/touch_disposition_gesture_filter.h" 18 #include "ui/events/gesture_detection/touch_disposition_gesture_filter.h"
17 #include "ui/events/gestures/motion_event_aura.h" 19 #include "ui/events/gestures/motion_event_aura.h"
18 20
19 namespace ui { 21 namespace ui {
20 22
21 class GestureProviderAura; 23 class GestureProviderAura;
(...skipping 13 matching lines...) Expand all
35 GestureProviderAuraClient* client); 37 GestureProviderAuraClient* client);
36 ~GestureProviderAura() override; 38 ~GestureProviderAura() override;
37 39
38 void set_gesture_consumer(GestureConsumer* consumer) { 40 void set_gesture_consumer(GestureConsumer* consumer) {
39 gesture_consumer_ = consumer; 41 gesture_consumer_ = consumer;
40 } 42 }
41 43
42 bool OnTouchEvent(TouchEvent* event); 44 bool OnTouchEvent(TouchEvent* event);
43 void OnTouchEventAck(uint32_t unique_touch_event_id, bool event_consumed); 45 void OnTouchEventAck(uint32_t unique_touch_event_id, bool event_consumed);
44 const MotionEventAura& pointer_state() { return pointer_state_; } 46 const MotionEventAura& pointer_state() { return pointer_state_; }
45 ScopedVector<GestureEvent>* GetAndResetPendingGestures(); 47 std::vector<std::unique_ptr<GestureEvent>> GetAndResetPendingGestures();
46 void OnTouchEnter(int pointer_id, float x, float y); 48 void OnTouchEnter(int pointer_id, float x, float y);
47 49
48 // GestureProviderClient implementation 50 // GestureProviderClient implementation
49 void OnGestureEvent(const GestureEventData& gesture) override; 51 void OnGestureEvent(const GestureEventData& gesture) override;
50 52
51 private: 53 private:
52 GestureProviderAuraClient* client_; 54 GestureProviderAuraClient* client_;
53 MotionEventAura pointer_state_; 55 MotionEventAura pointer_state_;
54 FilteredGestureProvider filtered_gesture_provider_; 56 FilteredGestureProvider filtered_gesture_provider_;
55 57
56 bool handling_event_; 58 bool handling_event_;
57 ScopedVector<GestureEvent> pending_gestures_; 59 std::vector<std::unique_ptr<GestureEvent>> pending_gestures_;
58 60
59 // |gesture_consumer_| must outlive this object. 61 // |gesture_consumer_| must outlive this object.
60 GestureConsumer* gesture_consumer_; 62 GestureConsumer* gesture_consumer_;
61 63
62 DISALLOW_COPY_AND_ASSIGN(GestureProviderAura); 64 DISALLOW_COPY_AND_ASSIGN(GestureProviderAura);
63 }; 65 };
64 66
65 } // namespace ui 67 } // namespace ui
66 68
67 #endif // UI_EVENTS_GESTURE_DETECTION_UI_GESTURE_PROVIDER_H_ 69 #endif // UI_EVENTS_GESTURE_DETECTION_UI_GESTURE_PROVIDER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698