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

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: Removes grab input window and extra grab and ungrab in X11WholeScreenMoveLoop (no more changes in T… 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
« 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 30f3aa022e17c6de4583a5273dffd4c6fba8fcba..ba40cde64305bf49c345233a9fd33e6f5c55b437 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
@@ -164,6 +166,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.
@@ -177,6 +182,12 @@ class VIEWS_EXPORT DesktopDragDropClientAuraX11
unsigned long event_time);
void SendXdndDrop(::Window dest_window);
+ // Sets an image to be used during the drag.
+ void SetDragImage(const gfx::ImageSkia& image, const 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_;
@@ -252,6 +263,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);
« 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