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

Unified Diff: ui/chromeos/touch_exploration_controller.cc

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/chromeos/touch_exploration_controller.cc
diff --git a/ui/chromeos/touch_exploration_controller.cc b/ui/chromeos/touch_exploration_controller.cc
index 584c1a10da0bb5f78ee07d2212c868177ec5a4fe..1adb000486182a21277fffb6fff49884b6d19432 100644
--- a/ui/chromeos/touch_exploration_controller.cc
+++ b/ui/chromeos/touch_exploration_controller.cc
@@ -846,24 +846,20 @@ void TouchExplorationController::OnGestureEvent(ui::GestureConsumer* consumer,
ui::GestureEvent* gesture) {}
void TouchExplorationController::ProcessGestureEvents() {
- std::unique_ptr<ScopedVector<ui::GestureEvent>> gestures(
- gesture_provider_->GetAndResetPendingGestures());
- if (gestures) {
- for (ScopedVector<GestureEvent>::iterator i = gestures->begin();
- i != gestures->end();
- ++i) {
- if ((*i)->type() == ui::ET_GESTURE_SWIPE &&
- state_ == GESTURE_IN_PROGRESS) {
- OnSwipeEvent(*i);
- // The tap timer to leave gesture state is ended, and we now wait for
- // all fingers to be released.
- tap_timer_.Stop();
- SET_STATE(WAIT_FOR_NO_FINGERS);
- return;
- }
- if (state_ == SLIDE_GESTURE && (*i)->IsScrollGestureEvent()) {
- SideSlideControl(*i);
- }
+ std::vector<std::unique_ptr<GestureEvent>> gestures =
+ gesture_provider_->GetAndResetPendingGestures();
+ for (const auto& gesture : gestures) {
+ if (gesture->type() == ui::ET_GESTURE_SWIPE &&
+ state_ == GESTURE_IN_PROGRESS) {
+ OnSwipeEvent(gesture.get());
+ // The tap timer to leave gesture state is ended, and we now wait for
+ // all fingers to be released.
+ tap_timer_.Stop();
+ SET_STATE(WAIT_FOR_NO_FINGERS);
+ return;
+ }
+ if (state_ == SLIDE_GESTURE && gesture->IsScrollGestureEvent()) {
+ SideSlideControl(gesture.get());
}
}
}

Powered by Google App Engine
This is Rietveld 408576698