| 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 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 91 // These methods are used to defer the processing of mouse/touch events | 91 // These methods are used to defer the processing of mouse/touch events |
| 92 // related to resize. A client (typically a RenderWidgetHostViewAura) can call | 92 // related to resize. A client (typically a RenderWidgetHostViewAura) can call |
| 93 // HoldPointerMoves when an resize is initiated and then ReleasePointerMoves | 93 // HoldPointerMoves when an resize is initiated and then ReleasePointerMoves |
| 94 // once the resize is completed. | 94 // once the resize is completed. |
| 95 // | 95 // |
| 96 // More than one hold can be invoked and each hold must be cancelled by a | 96 // More than one hold can be invoked and each hold must be cancelled by a |
| 97 // release before we resume normal operation. | 97 // release before we resume normal operation. |
| 98 void HoldPointerMoves(); | 98 void HoldPointerMoves(); |
| 99 void ReleasePointerMoves(); | 99 void ReleasePointerMoves(); |
| 100 | 100 |
| 101 bool HoldingPointerMovesForTesting(); |
| 102 |
| 101 // Gets the last location seen in a mouse event in this root window's | 103 // Gets the last location seen in a mouse event in this root window's |
| 102 // coordinates. This may return a point outside the root window's bounds. | 104 // coordinates. This may return a point outside the root window's bounds. |
| 103 gfx::Point GetLastMouseLocationInRoot() const; | 105 gfx::Point GetLastMouseLocationInRoot() const; |
| 104 | 106 |
| 105 void OnHostLostMouseGrab(); | 107 void OnHostLostMouseGrab(); |
| 106 void OnCursorMovedToRootLocation(const gfx::Point& root_location); | 108 void OnCursorMovedToRootLocation(const gfx::Point& root_location); |
| 107 | 109 |
| 108 // TODO(beng): This is only needed because this cleanup needs to happen after | 110 // TODO(beng): This is only needed because this cleanup needs to happen after |
| 109 // all other observers are notified of OnWindowDestroying() but | 111 // all other observers are notified of OnWindowDestroying() but |
| 110 // before OnWindowDestroyed() is sent (i.e. while the window | 112 // before OnWindowDestroyed() is sent (i.e. while the window |
| (...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 256 | 258 |
| 257 // Used to schedule DispatchHeldEvents() when |move_hold_count_| goes to 0. | 259 // Used to schedule DispatchHeldEvents() when |move_hold_count_| goes to 0. |
| 258 base::WeakPtrFactory<WindowEventDispatcher> held_event_factory_; | 260 base::WeakPtrFactory<WindowEventDispatcher> held_event_factory_; |
| 259 | 261 |
| 260 DISALLOW_COPY_AND_ASSIGN(WindowEventDispatcher); | 262 DISALLOW_COPY_AND_ASSIGN(WindowEventDispatcher); |
| 261 }; | 263 }; |
| 262 | 264 |
| 263 } // namespace aura | 265 } // namespace aura |
| 264 | 266 |
| 265 #endif // UI_AURA_WINDOW_EVENT_DISPATCHER_H_ | 267 #endif // UI_AURA_WINDOW_EVENT_DISPATCHER_H_ |
| OLD | NEW |