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 |
498 void WindowEventDispatcher::DispatchCancelTouchEvent(ui::TouchEvent* event) { | 503 void WindowEventDispatcher::DispatchCancelTouchEvent(ui::TouchEvent* event) { |
499 DispatchDetails details = OnEventFromSource(event); | 504 DispatchDetails details = OnEventFromSource(event); |
500 if (details.dispatcher_destroyed) | 505 if (details.dispatcher_destroyed) |
501 return; | 506 return; |
502 } | 507 } |
503 | 508 |
504 //////////////////////////////////////////////////////////////////////////////// | 509 //////////////////////////////////////////////////////////////////////////////// |
505 // WindowEventDispatcher, WindowObserver implementation: | 510 // WindowEventDispatcher, WindowObserver implementation: |
506 | 511 |
507 void WindowEventDispatcher::OnWindowDestroying(Window* window) { | 512 void WindowEventDispatcher::OnWindowDestroying(Window* window) { |
(...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
841 break; | 846 break; |
842 | 847 |
843 default: | 848 default: |
844 NOTREACHED(); | 849 NOTREACHED(); |
845 break; | 850 break; |
846 } | 851 } |
847 PreDispatchLocatedEvent(target, event); | 852 PreDispatchLocatedEvent(target, event); |
848 } | 853 } |
849 | 854 |
850 } // namespace aura | 855 } // namespace aura |
OLD | NEW |