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

Side by Side Diff: ui/views/widget/desktop_aura/x11_move_loop.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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef UI_VIEWS_WIDGET_DESKTOP_AURA_X11_MOVE_LOOP_H_
6 #define UI_VIEWS_WIDGET_DESKTOP_AURA_X11_MOVE_LOOP_H_
7
8 #include "ui/gfx/native_widget_types.h"
9 #include "ui/gfx/x/x11_types.h"
10
11 namespace views {
12
13 // Runs a nested message loop and grabs the mouse. This is used to implement
14 // dragging.
15 class X11MoveLoop {
16 public:
17 virtual ~X11MoveLoop() {}
18
19 // Runs the nested message loop. While the mouse is grabbed, use |cursor| as
20 // the mouse cursor. Returns true if the move-loop is completed successfully.
21 // If the pointer-grab fails, or the move-loop is canceled by the user (e.g.
22 // by pressing escape), then returns false.
23 virtual bool RunMoveLoop(aura::Window* window, gfx::NativeCursor cursor) = 0;
24
25 // Updates the cursor while the move loop is running.
26 virtual void UpdateCursor(gfx::NativeCursor cursor) = 0;
27
28 // Ends the RunMoveLoop() that's currently in progress.
29 virtual void EndMoveLoop() = 0;
30
31 // Sets an image to be used during the drag.
32 virtual void SetDragImage(const gfx::ImageSkia& image,
33 const gfx::Vector2dF& offset) = 0;
34 };
35
36 } // namespace views
37
38 #endif // UI_VIEWS_WIDGET_DESKTOP_AURA_X11_MOVE_LOOP_H_
OLDNEW
« no previous file with comments | « ui/views/widget/desktop_aura/x11_desktop_window_move_client.h ('k') | ui/views/widget/desktop_aura/x11_move_loop_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698