| 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 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 ui::TouchEvent mutable_touch_event = touch_event; | 152 ui::TouchEvent mutable_touch_event = touch_event; |
| 153 if (gesture_provider_->OnTouchEvent(&mutable_touch_event)) { | 153 if (gesture_provider_->OnTouchEvent(&mutable_touch_event)) { |
| 154 gesture_provider_->OnSyncTouchEventAck( | 154 gesture_provider_->OnSyncTouchEventAck( |
| 155 mutable_touch_event.unique_event_id(), false); | 155 mutable_touch_event.unique_touch_event_id(), false); |
| 156 } | 156 } |
| 157 ProcessGestureEvents(); | 157 ProcessGestureEvents(); |
| 158 } | 158 } |
| 159 | 159 |
| 160 // The rest of the processing depends on what state we're in. | 160 // The rest of the processing depends on what state we're in. |
| 161 switch (state_) { | 161 switch (state_) { |
| 162 case NO_FINGERS_DOWN: | 162 case NO_FINGERS_DOWN: |
| 163 return InNoFingersDown(touch_event, rewritten_event); | 163 return InNoFingersDown(touch_event, rewritten_event); |
| 164 case SINGLE_TAP_PRESSED: | 164 case SINGLE_TAP_PRESSED: |
| 165 return InSingleTapPressed(touch_event, rewritten_event); | 165 return InSingleTapPressed(touch_event, rewritten_event); |
| (...skipping 984 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1150 up_swipe_gestures_[4] = BindKeyEventWithFlags(VKEY_BROWSER_HOME, ui::EF_NONE); | 1150 up_swipe_gestures_[4] = BindKeyEventWithFlags(VKEY_BROWSER_HOME, ui::EF_NONE); |
| 1151 down_swipe_gestures_[4] = | 1151 down_swipe_gestures_[4] = |
| 1152 BindKeyEventWithFlags(VKEY_BROWSER_REFRESH, ui::EF_NONE); | 1152 BindKeyEventWithFlags(VKEY_BROWSER_REFRESH, ui::EF_NONE); |
| 1153 } | 1153 } |
| 1154 | 1154 |
| 1155 float TouchExplorationController::GetSplitTapTouchSlop() { | 1155 float TouchExplorationController::GetSplitTapTouchSlop() { |
| 1156 return gesture_detector_config_.touch_slop * 3; | 1156 return gesture_detector_config_.touch_slop * 3; |
| 1157 } | 1157 } |
| 1158 | 1158 |
| 1159 } // namespace ui | 1159 } // namespace ui |
| OLD | NEW |