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 465 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
476 | 476 |
477 // Rewrite at location of last touch exploration. | 477 // Rewrite at location of last touch exploration. |
478 rewritten_event->reset( | 478 rewritten_event->reset( |
479 new ui::TouchEvent(ui::ET_TOUCH_RELEASED, | 479 new ui::TouchEvent(ui::ET_TOUCH_RELEASED, |
480 last_touch_exploration_->location(), | 480 last_touch_exploration_->location(), |
481 initial_press_->touch_id(), | 481 initial_press_->touch_id(), |
482 event.time_stamp())); | 482 event.time_stamp())); |
483 (*rewritten_event)->set_flags(event.flags()); | 483 (*rewritten_event)->set_flags(event.flags()); |
484 EnterTouchToMouseMode(); | 484 EnterTouchToMouseMode(); |
485 state_ = TOUCH_EXPLORATION; | 485 state_ = TOUCH_EXPLORATION; |
| 486 EnterTouchToMouseMode(); |
486 VLOG_STATE(); | 487 VLOG_STATE(); |
487 return ui::EVENT_REWRITE_REWRITTEN; | 488 return ui::EVENT_REWRITE_REWRITTEN; |
488 } | 489 } |
489 NOTREACHED() << "Unexpected event type received."; | 490 NOTREACHED() << "Unexpected event type received."; |
490 return ui::EVENT_REWRITE_CONTINUE; | 491 return ui::EVENT_REWRITE_CONTINUE; |
491 } | 492 } |
492 | 493 |
493 ui::EventRewriteStatus TouchExplorationController::InWaitForRelease( | 494 ui::EventRewriteStatus TouchExplorationController::InWaitForRelease( |
494 const ui::TouchEvent& event, | 495 const ui::TouchEvent& event, |
495 scoped_ptr<ui::Event>* rewritten_event) { | 496 scoped_ptr<ui::Event>* rewritten_event) { |
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
697 return "TWO_TO_ONE_FINGER"; | 698 return "TWO_TO_ONE_FINGER"; |
698 case PASSTHROUGH: | 699 case PASSTHROUGH: |
699 return "PASSTHROUGH"; | 700 return "PASSTHROUGH"; |
700 case WAIT_FOR_RELEASE: | 701 case WAIT_FOR_RELEASE: |
701 return "WAIT_FOR_RELEASE"; | 702 return "WAIT_FOR_RELEASE"; |
702 } | 703 } |
703 return "Not a state"; | 704 return "Not a state"; |
704 } | 705 } |
705 | 706 |
706 } // namespace ui | 707 } // namespace ui |
OLD | NEW |