Chromium Code Reviews| Index: ui/views/widget/desktop_aura/desktop_drag_drop_client_aurax11.h |
| diff --git a/ui/views/widget/desktop_aura/desktop_drag_drop_client_aurax11.h b/ui/views/widget/desktop_aura/desktop_drag_drop_client_aurax11.h |
| index d4092489154ac5c4c79764bf35918fd3ddabb141..bc5c1186e1837461bb34074e24a149637631a80f 100644 |
| --- a/ui/views/widget/desktop_aura/desktop_drag_drop_client_aurax11.h |
| +++ b/ui/views/widget/desktop_aura/desktop_drag_drop_client_aurax11.h |
| @@ -16,6 +16,7 @@ |
| #include "ui/base/cursor/cursor.h" |
| #include "ui/base/dragdrop/drag_drop_types.h" |
| #include "ui/gfx/point.h" |
| +#include "ui/gfx/rect.h" |
| #include "ui/gfx/x/x11_atom_cache.h" |
| #include "ui/views/views_export.h" |
| #include "ui/views/widget/desktop_aura/x11_whole_screen_move_loop.h" |
| @@ -42,6 +43,7 @@ class SelectionFormatMap; |
| namespace views { |
| class DesktopNativeCursorManager; |
| +class Widget; |
| // Implements drag and drop on X11 for aura. On one side, this class takes raw |
| // X11 events forwarded from DesktopWindowTreeHostLinux, while on the other, it |
| @@ -153,6 +155,9 @@ class VIEWS_EXPORT DesktopDragDropClientAuraX11 |
| // server. |
| ui::SelectionFormatMap GetFormatMap() const; |
| + // Updates the cursor by re-grabbing the pointer while in the move loop. |
| + void UpdateCursor(); |
| + |
| // Handling XdndPosition can be paused while waiting for more data; this is |
| // called either synchronously from OnXdndPosition, or asynchronously after |
| // we've received data requested from the other window. |
| @@ -170,6 +175,12 @@ class VIEWS_EXPORT DesktopDragDropClientAuraX11 |
| // server. |
| void SendXClientEvent(::Window xid, XEvent* xev); |
| + // Sets an image to be used during the drag. |
| + void SetDragImage(const gfx::ImageSkia& image, gfx::Vector2dF offset); |
|
sadrul
2014/05/23 14:39:53
const gfx::Vector2dF&
varkha
2014/05/23 15:38:36
Done.
|
| + |
| + // Creates a window to show the drag image during the drag. |
| + void CreateDragImageWindow(); |
| + |
| // A nested message loop that notifies this object of events through the |
| // X11WholeScreenMoveLoopDelegate interface. |
| X11WholeScreenMoveLoop move_loop_; |
| @@ -245,6 +256,15 @@ class VIEWS_EXPORT DesktopDragDropClientAuraX11 |
| gfx::NativeCursor copy_grab_cursor_; |
| gfx::NativeCursor move_grab_cursor_; |
| + // A Widget is created during the drag. |
| + scoped_ptr<Widget> drag_widget_; |
| + gfx::ImageSkia drag_image_; |
| + gfx::Vector2dF drag_offset_; |
| + |
| + // Drag widget is positioned off screen when drag image is not set or is |
| + // completely transparent. |
| + gfx::Rect null_drag_widget_bounds_; |
| + |
| base::WeakPtrFactory<DesktopDragDropClientAuraX11> weak_ptr_factory_; |
| DISALLOW_COPY_AND_ASSIGN(DesktopDragDropClientAuraX11); |