Update V8 to version 4.7.57.
[chromium-blink-merge.git] / ui / views / widget / desktop_aura / x11_move_loop.h
blob102c8663efe1ec146b019b06069bd2e5d773022f
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.
5 #ifndef UI_VIEWS_WIDGET_DESKTOP_AURA_X11_MOVE_LOOP_H_
6 #define UI_VIEWS_WIDGET_DESKTOP_AURA_X11_MOVE_LOOP_H_
8 #include "ui/gfx/native_widget_types.h"
9 #include "ui/gfx/x/x11_types.h"
11 namespace views {
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() {}
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;
25 // Updates the cursor while the move loop is running.
26 virtual void UpdateCursor(gfx::NativeCursor cursor) = 0;
28 // Ends the move loop that's currently in progress.
29 virtual void EndMoveLoop() = 0;
32 } // namespace views
34 #endif // UI_VIEWS_WIDGET_DESKTOP_AURA_X11_MOVE_LOOP_H_