| 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 "ui/aura/client/cursor_client.h" | 9 #include "ui/aura/client/cursor_client.h" |
| 10 #include "ui/aura/window.h" | 10 #include "ui/aura/window.h" |
| (...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 376 return EVENT_REWRITE_DISCARD; | 376 return EVENT_REWRITE_DISCARD; |
| 377 | 377 |
| 378 // Rewrite at location of last touch exploration. | 378 // Rewrite at location of last touch exploration. |
| 379 rewritten_event->reset( | 379 rewritten_event->reset( |
| 380 new ui::TouchEvent(ui::ET_TOUCH_RELEASED, | 380 new ui::TouchEvent(ui::ET_TOUCH_RELEASED, |
| 381 last_touch_exploration_->location(), | 381 last_touch_exploration_->location(), |
| 382 initial_press_->touch_id(), | 382 initial_press_->touch_id(), |
| 383 event.time_stamp())); | 383 event.time_stamp())); |
| 384 (*rewritten_event)->set_flags(event.flags()); | 384 (*rewritten_event)->set_flags(event.flags()); |
| 385 state_ = TOUCH_EXPLORATION; | 385 state_ = TOUCH_EXPLORATION; |
| 386 EnterTouchToMouseMode(); |
| 386 VLOG_STATE(); | 387 VLOG_STATE(); |
| 387 return ui::EVENT_REWRITE_REWRITTEN; | 388 return ui::EVENT_REWRITE_REWRITTEN; |
| 388 } | 389 } |
| 389 NOTREACHED() << "Unexpected event type received."; | 390 NOTREACHED() << "Unexpected event type received."; |
| 390 return ui::EVENT_REWRITE_CONTINUE; | 391 return ui::EVENT_REWRITE_CONTINUE; |
| 391 } | 392 } |
| 392 | 393 |
| 393 void TouchExplorationController::OnTapTimerFired() { | 394 void TouchExplorationController::OnTapTimerFired() { |
| 394 switch (state_) { | 395 switch (state_) { |
| 395 case SINGLE_TAP_RELEASED: | 396 case SINGLE_TAP_RELEASED: |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 504 return "TOUCH_EXPLORATION"; | 505 return "TOUCH_EXPLORATION"; |
| 505 case PASSTHROUGH_MINUS_ONE: | 506 case PASSTHROUGH_MINUS_ONE: |
| 506 return "PASSTHROUGH_MINUS_ONE"; | 507 return "PASSTHROUGH_MINUS_ONE"; |
| 507 case TOUCH_EXPLORE_SECOND_PRESS: | 508 case TOUCH_EXPLORE_SECOND_PRESS: |
| 508 return "TOUCH_EXPLORE_SECOND_PRESS"; | 509 return "TOUCH_EXPLORE_SECOND_PRESS"; |
| 509 } | 510 } |
| 510 return "Not a state"; | 511 return "Not a state"; |
| 511 } | 512 } |
| 512 | 513 |
| 513 } // namespace ui | 514 } // namespace ui |
| OLD | NEW |