| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 ASH_WM_TOPLEVEL_WINDOW_EVENT_HANDLER_H_ | 5 #ifndef ASH_WM_TOPLEVEL_WINDOW_EVENT_HANDLER_H_ |
| 6 #define ASH_WM_TOPLEVEL_WINDOW_EVENT_HANDLER_H_ | 6 #define ASH_WM_TOPLEVEL_WINDOW_EVENT_HANDLER_H_ |
| 7 | 7 |
| 8 #include <set> | 8 #include <set> |
| 9 | 9 |
| 10 #include "ash/ash_export.h" | 10 #include "ash/ash_export.h" |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 DRAG_REVERT | 67 DRAG_REVERT |
| 68 }; | 68 }; |
| 69 | 69 |
| 70 void CreateScopedWindowResizer(aura::Window* window, | 70 void CreateScopedWindowResizer(aura::Window* window, |
| 71 const gfx::Point& point_in_parent, | 71 const gfx::Point& point_in_parent, |
| 72 int window_component); | 72 int window_component); |
| 73 | 73 |
| 74 // Finishes the drag. | 74 // Finishes the drag. |
| 75 void CompleteDrag(DragCompletionStatus status, int event_flags); | 75 void CompleteDrag(DragCompletionStatus status, int event_flags); |
| 76 | 76 |
| 77 ui::EventResult HandleMousePressed(aura::Window* target, |
| 78 ui::MouseEvent* event); |
| 79 ui::EventResult HandleMouseReleased(aura::Window* target, |
| 80 ui::MouseEvent* event); |
| 81 |
| 77 // Called during a drag to resize/position the window. | 82 // Called during a drag to resize/position the window. |
| 78 // The return value is returned by OnMouseEvent() above. | 83 // The return value is returned by OnMouseEvent() above. |
| 79 bool HandleDrag(aura::Window* target, ui::LocatedEvent* event); | 84 ui::EventResult HandleDrag(aura::Window* target, ui::LocatedEvent* event); |
| 80 | 85 |
| 81 // Called during mouse moves to update window resize shadows. | 86 // Called during mouse moves to update window resize shadows. |
| 82 // Return value is returned by OnMouseEvent() above. | 87 // Return value is returned by OnMouseEvent() above. |
| 83 bool HandleMouseMoved(aura::Window* target, ui::LocatedEvent* event); | 88 ui::EventResult HandleMouseMoved(aura::Window* target, |
| 89 ui::LocatedEvent* event); |
| 84 | 90 |
| 85 // Called for mouse exits to hide window resize shadows. | 91 // Called for mouse exits to hide window resize shadows. |
| 86 // Return value is returned by OnMouseEvent() above. | 92 // Return value is returned by OnMouseEvent() above. |
| 87 bool HandleMouseExited(aura::Window* target, ui::LocatedEvent* event); | 93 ui::EventResult HandleMouseExited(aura::Window* target, |
| 94 ui::LocatedEvent* event); |
| 88 | 95 |
| 89 // Invoked from ScopedWindowResizer if the window is destroyed. | 96 // Invoked from ScopedWindowResizer if the window is destroyed. |
| 90 void ResizerWindowDestroyed(); | 97 void ResizerWindowDestroyed(); |
| 91 | 98 |
| 92 // Are we running a nested message loop from RunMoveLoop(). | 99 // Are we running a nested message loop from RunMoveLoop(). |
| 93 bool in_move_loop_; | 100 bool in_move_loop_; |
| 94 | 101 |
| 95 // Was the move operation cancelled? Used only when the nested loop | 102 // Was the move operation cancelled? Used only when the nested loop |
| 96 // is used to move a window. | 103 // is used to move a window. |
| 97 bool move_cancelled_; | 104 bool move_cancelled_; |
| 98 | 105 |
| 99 // Is a gesture-resize in progress? | 106 // Is a gesture-resize in progress? |
| 100 bool in_gesture_resize_; | 107 bool in_gesture_resize_; |
| 101 | 108 |
| 102 scoped_ptr<ScopedWindowResizer> window_resizer_; | 109 scoped_ptr<ScopedWindowResizer> window_resizer_; |
| 103 | 110 |
| 104 base::Closure quit_closure_; | 111 base::Closure quit_closure_; |
| 105 | 112 |
| 106 DISALLOW_COPY_AND_ASSIGN(ToplevelWindowEventHandler); | 113 DISALLOW_COPY_AND_ASSIGN(ToplevelWindowEventHandler); |
| 107 }; | 114 }; |
| 108 | 115 |
| 109 } // namespace aura | 116 } // namespace aura |
| 110 | 117 |
| 111 #endif // ASH_WM_TOPLEVEL_WINDOW_EVENT_HANDLER_H_ | 118 #endif // ASH_WM_TOPLEVEL_WINDOW_EVENT_HANDLER_H_ |
| OLD | NEW |