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/aura/window_event_dispatcher.h" | 5 #include "ui/aura/window_event_dispatcher.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "base/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
10 #include "base/trace_event/trace_event.h" | 10 #include "base/trace_event/trace_event.h" |
(...skipping 481 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
492 !held_move_event_->IsTouchEvent()) { | 492 !held_move_event_->IsTouchEvent()) { |
493 const ui::TouchEvent& touchevent = | 493 const ui::TouchEvent& touchevent = |
494 static_cast<const ui::TouchEvent&>(event); | 494 static_cast<const ui::TouchEvent&>(event); |
495 | 495 |
496 if (!touchevent.synchronous_handling_disabled()) { | 496 if (!touchevent.synchronous_handling_disabled()) { |
497 scoped_ptr<ui::GestureRecognizer::Gestures> gestures; | 497 scoped_ptr<ui::GestureRecognizer::Gestures> gestures; |
498 | 498 |
499 // Once we've fully migrated to the eager gesture detector, we won't | 499 // Once we've fully migrated to the eager gesture detector, we won't |
500 // need to pass an event here. | 500 // need to pass an event here. |
501 gestures.reset(ui::GestureRecognizer::Get()->AckSyncTouchEvent( | 501 gestures.reset(ui::GestureRecognizer::Get()->AckSyncTouchEvent( |
502 touchevent.unique_event_id(), event.result(), | 502 touchevent.unique_touch_event_id(), event.result(), |
503 static_cast<Window*>(target))); | 503 static_cast<Window*>(target))); |
504 | 504 |
505 return ProcessGestures(gestures.get()); | 505 return ProcessGestures(gestures.get()); |
506 } | 506 } |
507 } | 507 } |
508 } | 508 } |
509 | 509 |
510 return details; | 510 return details; |
511 } | 511 } |
512 | 512 |
(...skipping 380 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
893 } | 893 } |
894 | 894 |
895 // This flag is set depending on the gestures recognized in the call above, | 895 // This flag is set depending on the gestures recognized in the call above, |
896 // and needs to propagate with the forwarded event. | 896 // and needs to propagate with the forwarded event. |
897 event->set_may_cause_scrolling(orig_event.may_cause_scrolling()); | 897 event->set_may_cause_scrolling(orig_event.may_cause_scrolling()); |
898 | 898 |
899 PreDispatchLocatedEvent(target, event); | 899 PreDispatchLocatedEvent(target, event); |
900 } | 900 } |
901 | 901 |
902 } // namespace aura | 902 } // namespace aura |
OLD | NEW |