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( | 200 gesture_provider_->OnTouchEventAck(mutable_touch_event.unique_event_id(), |
201 mutable_touch_event.unique_event_id(), false /* event_consumed */, | 201 false); |
202 false /* is_source_touch_event_set_non_blocking */); | |
203 } | 202 } |
204 ProcessGestureEvents(); | 203 ProcessGestureEvents(); |
205 } | 204 } |
206 | 205 |
207 ui::EventRewriteStatus status = ui::EVENT_REWRITE_CONTINUE; | 206 ui::EventRewriteStatus status = ui::EVENT_REWRITE_CONTINUE; |
208 // The rest of the processing depends on what state we're in. | 207 // The rest of the processing depends on what state we're in. |
209 switch (state_) { | 208 switch (state_) { |
210 case NO_FINGERS_DOWN: | 209 case NO_FINGERS_DOWN: |
211 status = InNoFingersDown(touch_event, rewritten_event); | 210 status = InNoFingersDown(touch_event, rewritten_event); |
212 break; | 211 break; |
(...skipping 995 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1208 return "TWO_FINGER_TAP"; | 1207 return "TWO_FINGER_TAP"; |
1209 } | 1208 } |
1210 return "Not a state"; | 1209 return "Not a state"; |
1211 } | 1210 } |
1212 | 1211 |
1213 float TouchExplorationController::GetSplitTapTouchSlop() { | 1212 float TouchExplorationController::GetSplitTapTouchSlop() { |
1214 return gesture_detector_config_.touch_slop * 3; | 1213 return gesture_detector_config_.touch_slop * 3; |
1215 } | 1214 } |
1216 | 1215 |
1217 } // namespace ui | 1216 } // namespace ui |
OLD | NEW |