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/debug/trace_event.h" | 8 #include "base/debug/trace_event.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/message_loop/message_loop.h" | 10 #include "base/message_loop/message_loop.h" |
(...skipping 477 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
488 | 488 |
489 //////////////////////////////////////////////////////////////////////////////// | 489 //////////////////////////////////////////////////////////////////////////////// |
490 // WindowEventDispatcher, ui::GestureEventHelper implementation: | 490 // WindowEventDispatcher, ui::GestureEventHelper implementation: |
491 | 491 |
492 bool WindowEventDispatcher::CanDispatchToConsumer( | 492 bool WindowEventDispatcher::CanDispatchToConsumer( |
493 ui::GestureConsumer* consumer) { | 493 ui::GestureConsumer* consumer) { |
494 Window* consumer_window = ConsumerToWindow(consumer); | 494 Window* consumer_window = ConsumerToWindow(consumer); |
495 return (consumer_window && consumer_window->GetRootWindow() == window()); | 495 return (consumer_window && consumer_window->GetRootWindow() == window()); |
496 } | 496 } |
497 | 497 |
498 void WindowEventDispatcher::DispatchPostponedGestureEvent( | |
499 ui::GestureEvent* event) { | |
500 DispatchGestureEvent(event); | |
501 } | |
502 | |
503 void WindowEventDispatcher::DispatchCancelTouchEvent(ui::TouchEvent* event) { | 498 void WindowEventDispatcher::DispatchCancelTouchEvent(ui::TouchEvent* event) { |
504 DispatchDetails details = OnEventFromSource(event); | 499 DispatchDetails details = OnEventFromSource(event); |
505 if (details.dispatcher_destroyed) | 500 if (details.dispatcher_destroyed) |
506 return; | 501 return; |
507 } | 502 } |
508 | 503 |
509 //////////////////////////////////////////////////////////////////////////////// | 504 //////////////////////////////////////////////////////////////////////////////// |
510 // WindowEventDispatcher, WindowObserver implementation: | 505 // WindowEventDispatcher, WindowObserver implementation: |
511 | 506 |
512 void WindowEventDispatcher::OnWindowDestroying(Window* window) { | 507 void WindowEventDispatcher::OnWindowDestroying(Window* window) { |
(...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
846 break; | 841 break; |
847 | 842 |
848 default: | 843 default: |
849 NOTREACHED(); | 844 NOTREACHED(); |
850 break; | 845 break; |
851 } | 846 } |
852 PreDispatchLocatedEvent(target, event); | 847 PreDispatchLocatedEvent(target, event); |
853 } | 848 } |
854 | 849 |
855 } // namespace aura | 850 } // namespace aura |
OLD | NEW |