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 #ifndef UI_AURA_WINDOW_EVENT_DISPATCHER_H_ | 5 #ifndef UI_AURA_WINDOW_EVENT_DISPATCHER_H_ |
6 #define UI_AURA_WINDOW_EVENT_DISPATCHER_H_ | 6 #define UI_AURA_WINDOW_EVENT_DISPATCHER_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
113 | 113 |
114 // TODO(beng): This is only needed because this cleanup needs to happen after | 114 // TODO(beng): This is only needed because this cleanup needs to happen after |
115 // all other observers are notified of OnWindowDestroying() but | 115 // all other observers are notified of OnWindowDestroying() but |
116 // before OnWindowDestroyed() is sent (i.e. while the window | 116 // before OnWindowDestroyed() is sent (i.e. while the window |
117 // hierarchy is still intact). This didn't seem worth adding a | 117 // hierarchy is still intact). This didn't seem worth adding a |
118 // generic notification for as only this class needs to implement | 118 // generic notification for as only this class needs to implement |
119 // it. I would however like to find a way to do this via an | 119 // it. I would however like to find a way to do this via an |
120 // observer. | 120 // observer. |
121 void OnPostNotifiedWindowDestroying(Window* window); | 121 void OnPostNotifiedWindowDestroying(Window* window); |
122 | 122 |
| 123 // Called when a Window wants to process a touch event asynchronously. Returns |
| 124 // false if the event should not be forwarded. |
| 125 bool OnProcessingTouchEventAsync(ui::TouchEvent* event); |
| 126 |
123 private: | 127 private: |
124 FRIEND_TEST_ALL_PREFIXES(WindowEventDispatcherTest, | 128 FRIEND_TEST_ALL_PREFIXES(WindowEventDispatcherTest, |
125 KeepTranslatedEventInRoot); | 129 KeepTranslatedEventInRoot); |
126 | 130 |
127 friend class test::WindowEventDispatcherTestApi; | 131 friend class test::WindowEventDispatcherTestApi; |
128 friend class Window; | 132 friend class Window; |
129 friend class TestScreen; | 133 friend class TestScreen; |
130 | 134 |
131 // The parameter for OnWindowHidden() to specify why window is hidden. | 135 // The parameter for OnWindowHidden() to specify why window is hidden. |
132 enum WindowHiddenReason { | 136 enum WindowHiddenReason { |
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
263 | 267 |
264 // Used to schedule DispatchHeldEvents() when |move_hold_count_| goes to 0. | 268 // Used to schedule DispatchHeldEvents() when |move_hold_count_| goes to 0. |
265 base::WeakPtrFactory<WindowEventDispatcher> held_event_factory_; | 269 base::WeakPtrFactory<WindowEventDispatcher> held_event_factory_; |
266 | 270 |
267 DISALLOW_COPY_AND_ASSIGN(WindowEventDispatcher); | 271 DISALLOW_COPY_AND_ASSIGN(WindowEventDispatcher); |
268 }; | 272 }; |
269 | 273 |
270 } // namespace aura | 274 } // namespace aura |
271 | 275 |
272 #endif // UI_AURA_WINDOW_EVENT_DISPATCHER_H_ | 276 #endif // UI_AURA_WINDOW_EVENT_DISPATCHER_H_ |
OLD | NEW |