OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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_VIEWS_WIDGET_DESKTOP_AURA_X11_WHOLE_SCREEN_MOVE_LOOP_H_ | 5 #ifndef UI_VIEWS_WIDGET_DESKTOP_AURA_X11_WHOLE_SCREEN_MOVE_LOOP_H_ |
6 #define UI_VIEWS_WIDGET_DESKTOP_AURA_X11_WHOLE_SCREEN_MOVE_LOOP_H_ | 6 #define UI_VIEWS_WIDGET_DESKTOP_AURA_X11_WHOLE_SCREEN_MOVE_LOOP_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 // Creates an input-only window to be used during the drag. | 60 // Creates an input-only window to be used during the drag. |
61 XID CreateDragInputWindow(XDisplay* display); | 61 XID CreateDragInputWindow(XDisplay* display); |
62 | 62 |
63 // Dispatch mouse movement event to |delegate_| in a posted task. | 63 // Dispatch mouse movement event to |delegate_| in a posted task. |
64 void DispatchMouseMovement(); | 64 void DispatchMouseMovement(); |
65 | 65 |
66 X11MoveLoopDelegate* delegate_; | 66 X11MoveLoopDelegate* delegate_; |
67 | 67 |
68 // Are we running a nested message loop from RunMoveLoop()? | 68 // Are we running a nested message loop from RunMoveLoop()? |
69 bool in_move_loop_; | 69 bool in_move_loop_; |
70 scoped_ptr<ui::ScopedEventDispatcher> nested_dispatcher_; | 70 std::unique_ptr<ui::ScopedEventDispatcher> nested_dispatcher_; |
71 | 71 |
72 // Cursor in use prior to the move loop starting. Restored when the move loop | 72 // Cursor in use prior to the move loop starting. Restored when the move loop |
73 // quits. | 73 // quits. |
74 gfx::NativeCursor initial_cursor_; | 74 gfx::NativeCursor initial_cursor_; |
75 | 75 |
76 bool should_reset_mouse_flags_; | 76 bool should_reset_mouse_flags_; |
77 | 77 |
78 // An invisible InputOnly window. Keyboard grab and sometimes mouse grab | 78 // An invisible InputOnly window. Keyboard grab and sometimes mouse grab |
79 // are set on this window. | 79 // are set on this window. |
80 XID grab_input_window_; | 80 XID grab_input_window_; |
81 | 81 |
82 // Whether the pointer was grabbed on |grab_input_window_|. | 82 // Whether the pointer was grabbed on |grab_input_window_|. |
83 bool grabbed_pointer_; | 83 bool grabbed_pointer_; |
84 | 84 |
85 base::Closure quit_closure_; | 85 base::Closure quit_closure_; |
86 | 86 |
87 // Keeps track of whether the move-loop is cancled by the user (e.g. by | 87 // Keeps track of whether the move-loop is cancled by the user (e.g. by |
88 // pressing escape). | 88 // pressing escape). |
89 bool canceled_; | 89 bool canceled_; |
90 | 90 |
91 scoped_ptr<ui::MouseEvent> last_motion_in_screen_; | 91 std::unique_ptr<ui::MouseEvent> last_motion_in_screen_; |
92 base::WeakPtrFactory<X11WholeScreenMoveLoop> weak_factory_; | 92 base::WeakPtrFactory<X11WholeScreenMoveLoop> weak_factory_; |
93 | 93 |
94 DISALLOW_COPY_AND_ASSIGN(X11WholeScreenMoveLoop); | 94 DISALLOW_COPY_AND_ASSIGN(X11WholeScreenMoveLoop); |
95 }; | 95 }; |
96 | 96 |
97 } // namespace views | 97 } // namespace views |
98 | 98 |
99 #endif // UI_VIEWS_WIDGET_DESKTOP_AURA_X11_WHOLE_SCREEN_MOVE_LOOP_H_ | 99 #endif // UI_VIEWS_WIDGET_DESKTOP_AURA_X11_WHOLE_SCREEN_MOVE_LOOP_H_ |
OLD | NEW |