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

Side by Side Diff: ui/chromeos/touch_exploration_controller.cc

Issue 2869823003: [VSync Queue] Plug touch ack to gesture events and flush vsync queue if necessary (Closed)
Patch Set: dtapuska's comment: Use ack to determine blocking vs. non-blocking Created 3 years, 6 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 #include "ui/chromeos/touch_exploration_controller.h" 5 #include "ui/chromeos/touch_exploration_controller.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/strings/string_number_conversions.h" 10 #include "base/strings/string_number_conversions.h"
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 186
187 // If the user is in a gesture state, or if there is a possiblity that the 187 // If the user is in a gesture state, or if there is a possiblity that the
188 // user will enter it in the future, we send the event to the gesture 188 // user will enter it in the future, we send the event to the gesture
189 // provider so it can keep track of the state of the fingers. When the user 189 // provider so it can keep track of the state of the fingers. When the user
190 // leaves one of these states, SET_STATE will set the gesture provider to 190 // leaves one of these states, SET_STATE will set the gesture provider to
191 // NULL. 191 // NULL.
192 if (gesture_provider_.get()) { 192 if (gesture_provider_.get()) {
193 ui::TouchEvent mutable_touch_event = touch_event; 193 ui::TouchEvent mutable_touch_event = touch_event;
194 if (gesture_provider_->OnTouchEvent(&mutable_touch_event)) { 194 if (gesture_provider_->OnTouchEvent(&mutable_touch_event)) {
195 gesture_provider_->OnTouchEventAck(mutable_touch_event.unique_event_id(), 195 gesture_provider_->OnTouchEventAck(mutable_touch_event.unique_event_id(),
196 false); 196 ER_UNHANDLED);
197 } 197 }
198 ProcessGestureEvents(); 198 ProcessGestureEvents();
199 } 199 }
200 200
201 ui::EventRewriteStatus status = ui::EVENT_REWRITE_CONTINUE; 201 ui::EventRewriteStatus status = ui::EVENT_REWRITE_CONTINUE;
202 // The rest of the processing depends on what state we're in. 202 // The rest of the processing depends on what state we're in.
203 switch (state_) { 203 switch (state_) {
204 case NO_FINGERS_DOWN: 204 case NO_FINGERS_DOWN:
205 status = InNoFingersDown(touch_event, rewritten_event); 205 status = InNoFingersDown(touch_event, rewritten_event);
206 break; 206 break;
(...skipping 985 matching lines...) Expand 10 before | Expand all | Expand 10 after
1192 return "TWO_FINGER_TAP"; 1192 return "TWO_FINGER_TAP";
1193 } 1193 }
1194 return "Not a state"; 1194 return "Not a state";
1195 } 1195 }
1196 1196
1197 float TouchExplorationController::GetSplitTapTouchSlop() { 1197 float TouchExplorationController::GetSplitTapTouchSlop() {
1198 return gesture_detector_config_.touch_slop * 3; 1198 return gesture_detector_config_.touch_slop * 3;
1199 } 1199 }
1200 1200
1201 } // namespace ui 1201 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698