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 UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_DRAG_DROP_CLIENT_AURAX11_H_ | 5 #ifndef UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_DRAG_DROP_CLIENT_AURAX11_H_ |
6 #define UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_DRAG_DROP_CLIENT_AURAX11_H_ | 6 #define UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_DRAG_DROP_CLIENT_AURAX11_H_ |
7 | 7 |
8 #include <set> | 8 #include <set> |
9 #include <vector> | 9 #include <vector> |
10 #include <X11/Xlib.h> | 10 #include <X11/Xlib.h> |
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
197 // Returns true if |image| has any visible regions (defined as having a pixel | 197 // Returns true if |image| has any visible regions (defined as having a pixel |
198 // with alpha > 32). | 198 // with alpha > 32). |
199 bool IsValidDragImage(const gfx::ImageSkia& image); | 199 bool IsValidDragImage(const gfx::ImageSkia& image); |
200 | 200 |
201 // A nested message loop that notifies this object of events through the | 201 // A nested message loop that notifies this object of events through the |
202 // X11MoveLoopDelegate interface. | 202 // X11MoveLoopDelegate interface. |
203 scoped_ptr<X11MoveLoop> move_loop_; | 203 scoped_ptr<X11MoveLoop> move_loop_; |
204 | 204 |
205 aura::Window* root_window_; | 205 aura::Window* root_window_; |
206 | 206 |
| 207 DesktopNativeCursorManager* cursor_manager_; |
| 208 |
207 Display* xdisplay_; | 209 Display* xdisplay_; |
208 ::Window xwindow_; | 210 ::Window xwindow_; |
209 | 211 |
210 ui::X11AtomCache atom_cache_; | 212 ui::X11AtomCache atom_cache_; |
211 | 213 |
212 // Target side information. | 214 // Target side information. |
213 class X11DragContext; | 215 class X11DragContext; |
214 scoped_ptr<X11DragContext> target_current_context_; | 216 scoped_ptr<X11DragContext> target_current_context_; |
215 | 217 |
216 // The modifier state for the most recent mouse move. | 218 // The modifier state for the most recent mouse move. |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
270 // Ends the move loop if the target is too slow to respond after the mouse is | 272 // Ends the move loop if the target is too slow to respond after the mouse is |
271 // released. | 273 // released. |
272 base::OneShotTimer<DesktopDragDropClientAuraX11> end_move_loop_timer_; | 274 base::OneShotTimer<DesktopDragDropClientAuraX11> end_move_loop_timer_; |
273 | 275 |
274 // Widget that the user drags around. May be NULL. | 276 // Widget that the user drags around. May be NULL. |
275 scoped_ptr<Widget> drag_widget_; | 277 scoped_ptr<Widget> drag_widget_; |
276 | 278 |
277 // The offset of |drag_widget_| relative to the mouse position. | 279 // The offset of |drag_widget_| relative to the mouse position. |
278 gfx::Vector2d drag_widget_offset_; | 280 gfx::Vector2d drag_widget_offset_; |
279 | 281 |
280 // We use these cursors while dragging. | |
281 gfx::NativeCursor grab_cursor_; | |
282 gfx::NativeCursor copy_grab_cursor_; | |
283 gfx::NativeCursor move_grab_cursor_; | |
284 | |
285 base::WeakPtrFactory<DesktopDragDropClientAuraX11> weak_ptr_factory_; | 282 base::WeakPtrFactory<DesktopDragDropClientAuraX11> weak_ptr_factory_; |
286 | 283 |
287 DISALLOW_COPY_AND_ASSIGN(DesktopDragDropClientAuraX11); | 284 DISALLOW_COPY_AND_ASSIGN(DesktopDragDropClientAuraX11); |
288 }; | 285 }; |
289 | 286 |
290 } // namespace views | 287 } // namespace views |
291 | 288 |
292 #endif // UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_DRAG_DROP_CLIENT_AURAX11_H_ | 289 #endif // UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_DRAG_DROP_CLIENT_AURAX11_H_ |
OLD | NEW |