| 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 865 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 876 return; | 876 return; |
| 877 } | 877 } |
| 878 break; | 878 break; |
| 879 | 879 |
| 880 default: | 880 default: |
| 881 NOTREACHED(); | 881 NOTREACHED(); |
| 882 break; | 882 break; |
| 883 } | 883 } |
| 884 | 884 |
| 885 ui::TouchEvent orig_event(*event, target, window()); | 885 ui::TouchEvent orig_event(*event, target, window()); |
| 886 if (!ui::GestureRecognizer::Get()->ProcessTouchEventPreDispatch(orig_event, | 886 if (!ui::GestureRecognizer::Get()->ProcessTouchEventPreDispatch(&orig_event, |
| 887 target)) { | 887 target)) { |
| 888 // The event is invalid - ignore it. | 888 // The event is invalid - ignore it. |
| 889 event->StopPropagation(); | 889 event->StopPropagation(); |
| 890 event->DisableSynchronousHandling(); | 890 event->DisableSynchronousHandling(); |
| 891 return; | 891 return; |
| 892 } | 892 } |
| 893 | 893 |
| 894 // This flag is set depending on the gestures recognized in the call above, |
| 895 // and needs to propagate with the forwarded event. |
| 896 event->set_may_cause_scrolling(orig_event.may_cause_scrolling()); |
| 897 |
| 894 PreDispatchLocatedEvent(target, event); | 898 PreDispatchLocatedEvent(target, event); |
| 895 } | 899 } |
| 896 | 900 |
| 897 } // namespace aura | 901 } // namespace aura |
| OLD | NEW |