| 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 <X11/Xlib.h> | 8 #include <X11/Xlib.h> |
| 9 #include <set> | 9 #include <set> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 255 SourceState source_state_; | 255 SourceState source_state_; |
| 256 | 256 |
| 257 // The current drag-drop client that has an active operation. Since we have | 257 // The current drag-drop client that has an active operation. Since we have |
| 258 // multiple root windows and multiple DesktopDragDropClientAuraX11 instances | 258 // multiple root windows and multiple DesktopDragDropClientAuraX11 instances |
| 259 // it is important to maintain only one drag and drop operation at any time. | 259 // it is important to maintain only one drag and drop operation at any time. |
| 260 static DesktopDragDropClientAuraX11* g_current_drag_drop_client; | 260 static DesktopDragDropClientAuraX11* g_current_drag_drop_client; |
| 261 | 261 |
| 262 // The operation bitfield as requested by StartDragAndDrop. | 262 // The operation bitfield as requested by StartDragAndDrop. |
| 263 int drag_operation_; | 263 int drag_operation_; |
| 264 | 264 |
| 265 // The DragEventSource as reported by StartDragAndDrop. |
| 266 ui::DragDropTypes::DragEventSource current_drag_event_source_; |
| 267 |
| 265 // We offer the other window a list of possible operations, | 268 // We offer the other window a list of possible operations, |
| 266 // XdndActionsList. This is the requested action from the other window. This | 269 // XdndActionsList. This is the requested action from the other window. This |
| 267 // is DRAG_NONE if we haven't sent out an XdndPosition message yet, haven't | 270 // is DRAG_NONE if we haven't sent out an XdndPosition message yet, haven't |
| 268 // yet received an XdndStatus or if the other window has told us that there's | 271 // yet received an XdndStatus or if the other window has told us that there's |
| 269 // no action that we can agree on. | 272 // no action that we can agree on. |
| 270 ui::DragDropTypes::DragOperation negotiated_operation_; | 273 ui::DragDropTypes::DragOperation negotiated_operation_; |
| 271 | 274 |
| 272 // Ends the move loop if the target is too slow to respond after the mouse is | 275 // Ends the move loop if the target is too slow to respond after the mouse is |
| 273 // released. | 276 // released. |
| 274 base::OneShotTimer<DesktopDragDropClientAuraX11> end_move_loop_timer_; | 277 base::OneShotTimer<DesktopDragDropClientAuraX11> end_move_loop_timer_; |
| 275 | 278 |
| 276 // Widget that the user drags around. May be NULL. | 279 // Widget that the user drags around. May be NULL. |
| 277 scoped_ptr<Widget> drag_widget_; | 280 scoped_ptr<Widget> drag_widget_; |
| 278 | 281 |
| 279 // The offset of |drag_widget_| relative to the mouse position. | 282 // The offset of |drag_widget_| relative to the mouse position. |
| 280 gfx::Vector2d drag_widget_offset_; | 283 gfx::Vector2d drag_widget_offset_; |
| 281 | 284 |
| 282 base::WeakPtrFactory<DesktopDragDropClientAuraX11> weak_ptr_factory_; | 285 base::WeakPtrFactory<DesktopDragDropClientAuraX11> weak_ptr_factory_; |
| 283 | 286 |
| 284 DISALLOW_COPY_AND_ASSIGN(DesktopDragDropClientAuraX11); | 287 DISALLOW_COPY_AND_ASSIGN(DesktopDragDropClientAuraX11); |
| 285 }; | 288 }; |
| 286 | 289 |
| 287 } // namespace views | 290 } // namespace views |
| 288 | 291 |
| 289 #endif // UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_DRAG_DROP_CLIENT_AURAX11_H_ | 292 #endif // UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_DRAG_DROP_CLIENT_AURAX11_H_ |
| OLD | NEW |