OLD | NEW |
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 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
190 } | 190 } |
191 | 191 |
192 // If the user is in a gesture state, or if there is a possiblity that the | 192 // If the user is in a gesture state, or if there is a possiblity that the |
193 // user will enter it in the future, we send the event to the gesture | 193 // user will enter it in the future, we send the event to the gesture |
194 // provider so it can keep track of the state of the fingers. When the user | 194 // provider so it can keep track of the state of the fingers. When the user |
195 // leaves one of these states, SET_STATE will set the gesture provider to | 195 // leaves one of these states, SET_STATE will set the gesture provider to |
196 // NULL. | 196 // NULL. |
197 if (gesture_provider_.get()) { | 197 if (gesture_provider_.get()) { |
198 ui::TouchEvent mutable_touch_event = touch_event; | 198 ui::TouchEvent mutable_touch_event = touch_event; |
199 if (gesture_provider_->OnTouchEvent(&mutable_touch_event)) { | 199 if (gesture_provider_->OnTouchEvent(&mutable_touch_event)) { |
200 gesture_provider_->OnTouchEventAck(mutable_touch_event.unique_event_id(), | 200 gesture_provider_->OnTouchEventAck( |
201 false); | 201 mutable_touch_event.unique_event_id(), false /* event_consumed */, |
| 202 false /* is_source_touch_event_set_non_blocking */); |
202 } | 203 } |
203 ProcessGestureEvents(); | 204 ProcessGestureEvents(); |
204 } | 205 } |
205 | 206 |
206 ui::EventRewriteStatus status = ui::EVENT_REWRITE_CONTINUE; | 207 ui::EventRewriteStatus status = ui::EVENT_REWRITE_CONTINUE; |
207 // The rest of the processing depends on what state we're in. | 208 // The rest of the processing depends on what state we're in. |
208 switch (state_) { | 209 switch (state_) { |
209 case NO_FINGERS_DOWN: | 210 case NO_FINGERS_DOWN: |
210 status = InNoFingersDown(touch_event, rewritten_event); | 211 status = InNoFingersDown(touch_event, rewritten_event); |
211 break; | 212 break; |
(...skipping 995 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1207 return "TWO_FINGER_TAP"; | 1208 return "TWO_FINGER_TAP"; |
1208 } | 1209 } |
1209 return "Not a state"; | 1210 return "Not a state"; |
1210 } | 1211 } |
1211 | 1212 |
1212 float TouchExplorationController::GetSplitTapTouchSlop() { | 1213 float TouchExplorationController::GetSplitTapTouchSlop() { |
1213 return gesture_detector_config_.touch_slop * 3; | 1214 return gesture_detector_config_.touch_slop * 3; |
1214 } | 1215 } |
1215 | 1216 |
1216 } // namespace ui | 1217 } // namespace ui |
OLD | NEW |