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

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

Issue 452413002: [Refactor]: Move drag_widget_ out of X11WholeScreenMoveLoop (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 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
« no previous file with comments | « no previous file | ui/views/widget/desktop_aura/desktop_drag_drop_client_aurax11.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 3a77f80f9fb1293f4474c746dbdbbc634282e5fc..8d301539f9e6514283e8f45c0384afdd8b1aa9cb 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
@@ -29,6 +29,7 @@ class DragDropDelegate;
}
namespace gfx {
+class ImageSkia;
class Point;
}
@@ -42,6 +43,7 @@ class SelectionFormatMap;
namespace views {
class DesktopNativeCursorManager;
+class Widget;
class X11MoveLoop;
// Implements drag and drop on X11 for aura. On one side, this class takes raw
@@ -184,6 +186,13 @@ class VIEWS_EXPORT DesktopDragDropClientAuraX11
unsigned long event_time);
void SendXdndDrop(::Window dest_window);
+ // Creates a widget for the user to drag around.
+ void CreateDragWidget(const gfx::ImageSkia& image);
+
+ // Returns true if |image| has any visible regions (defined as having a pixel
+ // with alpha > 32).
+ bool IsValidDragImage(const gfx::ImageSkia& image);
+
// A nested message loop that notifies this object of events through the
// X11MoveLoopDelegate interface.
scoped_ptr<X11MoveLoop> move_loop_;
@@ -254,6 +263,12 @@ class VIEWS_EXPORT DesktopDragDropClientAuraX11
// released.
base::OneShotTimer<DesktopDragDropClientAuraX11> end_move_loop_timer_;
+ // Widget that the user drags around. May be NULL.
+ scoped_ptr<Widget> drag_widget_;
+
+ // The offset of |drag_widget_| relative to the mouse position.
+ gfx::Vector2d drag_widget_offset_;
+
// We use these cursors while dragging.
gfx::NativeCursor grab_cursor_;
gfx::NativeCursor copy_grab_cursor_;
« no previous file with comments | « no previous file | ui/views/widget/desktop_aura/desktop_drag_drop_client_aurax11.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698