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

Unified Diff: ui/events/gestures/gesture_recognizer.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 side-by-side diff with in-line comments
Download patch
Index: ui/events/gestures/gesture_recognizer.h
diff --git a/ui/events/gestures/gesture_recognizer.h b/ui/events/gestures/gesture_recognizer.h
index bc20699ce59bc479d118bd9d00d87ffc2bb9baf4..4f3daf4d27d020f8828555a092172e7b077524d8 100644
--- a/ui/events/gestures/gesture_recognizer.h
+++ b/ui/events/gestures/gesture_recognizer.h
@@ -7,9 +7,9 @@
#include <stdint.h>
+#include <memory>
#include <vector>
-#include "base/memory/scoped_vector.h"
#include "ui/events/event_constants.h"
#include "ui/events/events_export.h"
#include "ui/events/gestures/gesture_types.h"
@@ -24,8 +24,7 @@ class EVENTS_EXPORT GestureRecognizer {
static GestureRecognizer* Get();
static void Reset();
- // List of GestureEvent*.
- typedef ScopedVector<GestureEvent> Gestures;
+ using Gestures = std::vector<std::unique_ptr<GestureEvent>>;
virtual ~GestureRecognizer() {}
@@ -34,12 +33,11 @@ class EVENTS_EXPORT GestureRecognizer {
virtual bool ProcessTouchEventPreDispatch(TouchEvent* event,
GestureConsumer* consumer) = 0;
- // Returns a list of zero or more GestureEvents. The caller is responsible for
- // freeing the returned events. Acks the gesture packet in the queue which
- // matches with unique_event_id.
- virtual Gestures* AckTouchEvent(uint32_t unique_event_id,
- ui::EventResult result,
- GestureConsumer* consumer) = 0;
+ // Returns a list of zero or more GestureEvents. Acks the gesture packet in
+ // the queue which matches with unique_event_id.
+ virtual Gestures AckTouchEvent(uint32_t unique_event_id,
+ ui::EventResult result,
+ GestureConsumer* consumer) = 0;
// This is called when the consumer is destroyed. So this should cleanup any
// internal state maintained for |consumer|. Returns true iff there was

Powered by Google App Engine
This is Rietveld 408576698