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 397 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
408 return EVENT_REWRITE_DISCARD; | 408 return EVENT_REWRITE_DISCARD; |
409 | 409 |
410 // Rewrite at location of last touch exploration. | 410 // Rewrite at location of last touch exploration. |
411 rewritten_event->reset( | 411 rewritten_event->reset( |
412 new ui::TouchEvent(ui::ET_TOUCH_RELEASED, | 412 new ui::TouchEvent(ui::ET_TOUCH_RELEASED, |
413 last_touch_exploration_->location(), | 413 last_touch_exploration_->location(), |
414 initial_press_->touch_id(), | 414 initial_press_->touch_id(), |
415 event.time_stamp())); | 415 event.time_stamp())); |
416 (*rewritten_event)->set_flags(event.flags()); | 416 (*rewritten_event)->set_flags(event.flags()); |
417 state_ = TOUCH_EXPLORATION; | 417 state_ = TOUCH_EXPLORATION; |
| 418 EnterTouchToMouseMode(); |
418 VLOG_STATE(); | 419 VLOG_STATE(); |
419 return ui::EVENT_REWRITE_REWRITTEN; | 420 return ui::EVENT_REWRITE_REWRITTEN; |
420 } | 421 } |
421 NOTREACHED() << "Unexpected event type received."; | 422 NOTREACHED() << "Unexpected event type received."; |
422 return ui::EVENT_REWRITE_CONTINUE; | 423 return ui::EVENT_REWRITE_CONTINUE; |
423 } | 424 } |
424 | 425 |
425 ui::EventRewriteStatus TouchExplorationController::InWaitForRelease( | 426 ui::EventRewriteStatus TouchExplorationController::InWaitForRelease( |
426 const ui::TouchEvent& event, | 427 const ui::TouchEvent& event, |
427 scoped_ptr<ui::Event>* rewritten_event) { | 428 scoped_ptr<ui::Event>* rewritten_event) { |
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
555 return "TWO_TO_ONE_FINGER"; | 556 return "TWO_TO_ONE_FINGER"; |
556 case PASSTHROUGH: | 557 case PASSTHROUGH: |
557 return "PASSTHROUGH"; | 558 return "PASSTHROUGH"; |
558 case WAIT_FOR_RELEASE: | 559 case WAIT_FOR_RELEASE: |
559 return "WAIT_FOR_RELEASE"; | 560 return "WAIT_FOR_RELEASE"; |
560 } | 561 } |
561 return "Not a state"; | 562 return "Not a state"; |
562 } | 563 } |
563 | 564 |
564 } // namespace ui | 565 } // namespace ui |
OLD | NEW |