Index: ui/views/widget/desktop_aura/x11_whole_screen_move_loop.h |
diff --git a/ui/views/widget/desktop_aura/x11_whole_screen_move_loop.h b/ui/views/widget/desktop_aura/x11_whole_screen_move_loop.h |
index ceff84f9fb29591f9ac49f90340d10e25362658c..c0c25466647f251463af7b6430eae47eb25a3be4 100644 |
--- a/ui/views/widget/desktop_aura/x11_whole_screen_move_loop.h |
+++ b/ui/views/widget/desktop_aura/x11_whole_screen_move_loop.h |
@@ -7,15 +7,21 @@ |
#include "base/compiler_specific.h" |
#include "base/message_loop/message_loop.h" |
+#include "ui/gfx/image/image_skia.h" |
#include "ui/gfx/native_widget_types.h" |
+#include "ui/gfx/vector2d_f.h" |
#include "ui/views/widget/desktop_aura/x11_whole_screen_move_loop_delegate.h" |
+typedef struct _XDisplay XDisplay; |
+ |
namespace aura { |
class Window; |
} |
namespace views { |
+class Widget; |
+ |
// Runs a nested message loop and grabs the mouse. This is used to implement |
// dragging. |
class X11WholeScreenMoveLoop : public base::MessageLoop::Dispatcher { |
@@ -37,11 +43,20 @@ class X11WholeScreenMoveLoop : public base::MessageLoop::Dispatcher { |
// Ends the RunMoveLoop() that's currently in progress. |
void EndMoveLoop(); |
+ // Sets an image to be used during the drag. |
+ void SetDragImage(const gfx::ImageSkia& image, gfx::Vector2dF offset); |
+ |
private: |
// Grabs the pointer, setting the mouse cursor to |cursor|. Returns true if |
// the grab was successful. |
bool GrabPointerWithCursor(gfx::NativeCursor cursor); |
+ // Creates an input-only window to be used during the drag. |
+ Window CreateDragInputWindow(XDisplay* display); |
+ |
+ // Creates a window to show the drag image during the drag. |
+ void CreateDragImageWindow(); |
+ |
X11WholeScreenMoveLoopDelegate* delegate_; |
// Are we running a nested message loop from RunMoveLoop()? |
@@ -54,6 +69,12 @@ class X11WholeScreenMoveLoop : public base::MessageLoop::Dispatcher { |
base::Closure quit_closure_; |
+ // A Widget is created during the drag if there is an image available to be |
+ // used during the drag. |
+ scoped_ptr<Widget> drag_widget_; |
+ gfx::ImageSkia drag_image_; |
+ gfx::Vector2dF drag_offset_; |
+ |
DISALLOW_COPY_AND_ASSIGN(X11WholeScreenMoveLoop); |
}; |