Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(30)

Unified Diff: ui/views/widget/desktop_aura/desktop_drag_drop_client_aurax11.h

Issue 262893002: Removes grab input window and extra grab and ungrab in X11WholeScreenMoveLoop Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Additional SetCapture after Attach and Show in TabDragController Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 35a4ee9fafa70a676a82d060bb091356948b3b79..eb35121ddbf1e4ccd06bbfb9e8be22236394ea39 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
@@ -149,6 +149,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.
@@ -166,6 +169,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);
+
+ // 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_;
@@ -231,6 +240,12 @@ class VIEWS_EXPORT DesktopDragDropClientAuraX11
gfx::NativeCursor copy_grab_cursor_;
gfx::NativeCursor move_grab_cursor_;
+ // 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_;
+
base::WeakPtrFactory<DesktopDragDropClientAuraX11> weak_ptr_factory_;
DISALLOW_COPY_AND_ASSIGN(DesktopDragDropClientAuraX11);

Powered by Google App Engine
This is Rietveld 408576698