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

Unified Diff: ui/chromeos/touch_exploration_controller.cc

Issue 428643008: Revert of Fix Touch Exploration tests so they don't break eager gesture detection. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/chromeos/touch_exploration_controller.h ('k') | ui/chromeos/touch_exploration_controller_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/chromeos/touch_exploration_controller.cc
diff --git a/ui/chromeos/touch_exploration_controller.cc b/ui/chromeos/touch_exploration_controller.cc
index 3670f1e948f213908d1884d9f844eacf35916a5c..6b2584afc7f2afc4c3d6bec3c3491e1fb11ae054 100644
--- a/ui/chromeos/touch_exploration_controller.cc
+++ b/ui/chromeos/touch_exploration_controller.cc
@@ -35,6 +35,7 @@ TouchExplorationController::TouchExplorationController(
: root_window_(root_window),
delegate_(delegate),
state_(NO_FINGERS_DOWN),
+ event_handler_for_testing_(NULL),
gesture_provider_(this),
prev_state_(NO_FINGERS_DOWN),
VLOG_on_(true),
@@ -592,13 +593,13 @@ void TouchExplorationController::OnTapTimerFired() {
case GESTURE_IN_PROGRESS:
// Discard any pending gestures.
delete gesture_provider_.GetAndResetPendingGestures();
+ EnterTouchToMouseMode();
state_ = TOUCH_EXPLORATION;
VLOG_STATE();
break;
default:
return;
}
- EnterTouchToMouseMode();
scoped_ptr<ui::Event> mouse_move =
CreateMouseMoveEvent(initial_press_->location(), initial_press_->flags());
DispatchEvent(mouse_move.get());
@@ -606,6 +607,10 @@ void TouchExplorationController::OnTapTimerFired() {
}
void TouchExplorationController::DispatchEvent(ui::Event* event) {
+ if (event_handler_for_testing_) {
+ event_handler_for_testing_->OnEvent(event);
+ return;
+ }
ui::EventDispatchDetails result ALLOW_UNUSED =
root_window_->GetHost()->dispatcher()->OnEventFromSource(event);
}
« no previous file with comments | « ui/chromeos/touch_exploration_controller.h ('k') | ui/chromeos/touch_exploration_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698