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 "base/logging.h" | 7 #include "base/logging.h" |
8 #include "base/strings/string_number_conversions.h" | 8 #include "base/strings/string_number_conversions.h" |
9 #include "base/time/default_tick_clock.h" | 9 #include "base/time/default_tick_clock.h" |
10 #include "ui/aura/client/cursor_client.h" | 10 #include "ui/aura/client/cursor_client.h" |
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
143 } | 143 } |
144 } | 144 } |
145 | 145 |
146 // If the user is in a gesture state, or if there is a possiblity that the | 146 // If the user is in a gesture state, or if there is a possiblity that the |
147 // user will enter it in the future, we send the event to the gesture | 147 // user will enter it in the future, we send the event to the gesture |
148 // provider so it can keep track of the state of the fingers. When the user | 148 // provider so it can keep track of the state of the fingers. When the user |
149 // leaves one of these states, SET_STATE will set the gesture provider to | 149 // leaves one of these states, SET_STATE will set the gesture provider to |
150 // NULL. | 150 // NULL. |
151 if (gesture_provider_.get()) { | 151 if (gesture_provider_.get()) { |
152 gesture_provider_->OnTouchEvent(touch_event); | 152 gesture_provider_->OnTouchEvent(touch_event); |
153 gesture_provider_->OnTouchEventAck(false); | 153 gesture_provider_->OnAsyncTouchEventAck(false); |
sadrul
2014/12/03 21:30:11
Isn't this actually sync ack?
tdresser
2014/12/05 16:44:31
Done.
| |
154 ProcessGestureEvents(); | 154 ProcessGestureEvents(); |
155 } | 155 } |
156 | 156 |
157 // The rest of the processing depends on what state we're in. | 157 // The rest of the processing depends on what state we're in. |
158 switch (state_) { | 158 switch (state_) { |
159 case NO_FINGERS_DOWN: | 159 case NO_FINGERS_DOWN: |
160 return InNoFingersDown(touch_event, rewritten_event); | 160 return InNoFingersDown(touch_event, rewritten_event); |
161 case SINGLE_TAP_PRESSED: | 161 case SINGLE_TAP_PRESSED: |
162 return InSingleTapPressed(touch_event, rewritten_event); | 162 return InSingleTapPressed(touch_event, rewritten_event); |
163 case SINGLE_TAP_RELEASED: | 163 case SINGLE_TAP_RELEASED: |
(...skipping 983 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1147 up_swipe_gestures_[4] = BindKeyEventWithFlags(VKEY_BROWSER_HOME, ui::EF_NONE); | 1147 up_swipe_gestures_[4] = BindKeyEventWithFlags(VKEY_BROWSER_HOME, ui::EF_NONE); |
1148 down_swipe_gestures_[4] = | 1148 down_swipe_gestures_[4] = |
1149 BindKeyEventWithFlags(VKEY_BROWSER_REFRESH, ui::EF_NONE); | 1149 BindKeyEventWithFlags(VKEY_BROWSER_REFRESH, ui::EF_NONE); |
1150 } | 1150 } |
1151 | 1151 |
1152 float TouchExplorationController::GetSplitTapTouchSlop() { | 1152 float TouchExplorationController::GetSplitTapTouchSlop() { |
1153 return gesture_detector_config_.touch_slop * 3; | 1153 return gesture_detector_config_.touch_slop * 3; |
1154 } | 1154 } |
1155 | 1155 |
1156 } // namespace ui | 1156 } // namespace ui |
OLD | NEW |