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 "base/callback.h" | 8 #include "base/callback.h" |
9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
10 #include "base/memory/weak_ptr.h" | 10 #include "base/memory/weak_ptr.h" |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
84 // cursor wherever it goes on screen during a drag, since normal windows | 84 // cursor wherever it goes on screen during a drag, since normal windows |
85 // don't receive pointer motion events outside of their bounds. | 85 // don't receive pointer motion events outside of their bounds. |
86 ::Window grab_input_window_; | 86 ::Window grab_input_window_; |
87 | 87 |
88 base::Closure quit_closure_; | 88 base::Closure quit_closure_; |
89 | 89 |
90 // Keeps track of whether the move-loop is cancled by the user (e.g. by | 90 // Keeps track of whether the move-loop is cancled by the user (e.g. by |
91 // pressing escape). | 91 // pressing escape). |
92 bool canceled_; | 92 bool canceled_; |
93 | 93 |
| 94 // Keeps track of whether we still have a pointer grab at the end of the loop. |
| 95 bool has_grab_; |
| 96 |
94 // A Widget is created during the drag if there is an image available to be | 97 // A Widget is created during the drag if there is an image available to be |
95 // used during the drag. | 98 // used during the drag. |
96 scoped_ptr<Widget> drag_widget_; | 99 scoped_ptr<Widget> drag_widget_; |
97 gfx::ImageSkia drag_image_; | 100 gfx::ImageSkia drag_image_; |
98 gfx::Vector2dF drag_offset_; | 101 gfx::Vector2dF drag_offset_; |
99 XMotionEvent last_xmotion_; | 102 XMotionEvent last_xmotion_; |
100 base::WeakPtrFactory<X11WholeScreenMoveLoop> weak_factory_; | 103 base::WeakPtrFactory<X11WholeScreenMoveLoop> weak_factory_; |
101 | 104 |
102 DISALLOW_COPY_AND_ASSIGN(X11WholeScreenMoveLoop); | 105 DISALLOW_COPY_AND_ASSIGN(X11WholeScreenMoveLoop); |
103 }; | 106 }; |
104 | 107 |
105 } // namespace views | 108 } // namespace views |
106 | 109 |
107 #endif // UI_VIEWS_WIDGET_DESKTOP_AURA_X11_WHOLE_SCREEN_MOVE_LOOP_H_ | 110 #endif // UI_VIEWS_WIDGET_DESKTOP_AURA_X11_WHOLE_SCREEN_MOVE_LOOP_H_ |
OLD | NEW |