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

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

Issue 431973006: Fix flakiness of DesktopDragDropClientAuraX11Tests (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 | « ui/views/views.gyp ('k') | 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..de2a9ba116246d5f2e5556c5d76d1fc866c3015a 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
@@ -18,8 +18,7 @@
#include "ui/gfx/point.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"
-#include "ui/views/widget/desktop_aura/x11_whole_screen_move_loop_delegate.h"
+#include "ui/views/widget/desktop_aura/x11_move_loop_delegate.h"
#include "ui/wm/public/drag_drop_client.h"
namespace aura {
@@ -42,6 +41,7 @@ class SelectionFormatMap;
namespace views {
class DesktopNativeCursorManager;
+class X11MoveLoop;
// 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
@@ -49,7 +49,7 @@ class DesktopNativeCursorManager;
class VIEWS_EXPORT DesktopDragDropClientAuraX11
: public aura::client::DragDropClient,
public aura::WindowObserver,
- public X11WholeScreenMoveLoopDelegate {
+ public X11MoveLoopDelegate {
public:
DesktopDragDropClientAuraX11(
aura::Window* root_window,
@@ -63,6 +63,8 @@ class VIEWS_EXPORT DesktopDragDropClientAuraX11
// X11 messages to windows in our process.
static DesktopDragDropClientAuraX11* GetForWindow(::Window window);
+ void Init();
+
// These methods handle the various X11 client messages from the platform.
void OnXdndEnter(const XClientMessageEvent& event);
void OnXdndLeave(const XClientMessageEvent& event);
@@ -100,6 +102,10 @@ class VIEWS_EXPORT DesktopDragDropClientAuraX11
protected:
// The following methods are virtual for the sake of testing.
+ // Creates a move loop.
+ virtual scoped_ptr<X11MoveLoop> CreateMoveLoop(
+ X11MoveLoopDelegate* delegate);
+
// Finds the topmost X11 window at |screen_point| and returns it if it is
// Xdnd aware. Returns NULL otherwise.
virtual ::Window FindWindowFor(const gfx::Point& screen_point);
@@ -178,8 +184,8 @@ class VIEWS_EXPORT DesktopDragDropClientAuraX11
void SendXdndDrop(::Window dest_window);
// A nested message loop that notifies this object of events through the
- // X11WholeScreenMoveLoopDelegate interface.
- X11WholeScreenMoveLoop move_loop_;
+ // X11MoveLoopDelegate interface.
+ scoped_ptr<X11MoveLoop> move_loop_;
aura::Window* root_window_;
« no previous file with comments | « ui/views/views.gyp ('k') | 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