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

Side by Side Diff: ui/wm/public/window_move_client.h

Issue 2828913003: Replace "nested message loop" with "nested run loop" in comments. (Closed)
Patch Set: rebase Created 3 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 unified diff | Download patch
« no previous file with comments | « ui/views/widget/widget.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef UI_WM_PUBLIC_WINDOW_MOVE_CLIENT_H_ 5 #ifndef UI_WM_PUBLIC_WINDOW_MOVE_CLIENT_H_
6 #define UI_WM_PUBLIC_WINDOW_MOVE_CLIENT_H_ 6 #define UI_WM_PUBLIC_WINDOW_MOVE_CLIENT_H_
7 7
8 #include "ui/aura/aura_export.h" 8 #include "ui/aura/aura_export.h"
9 #include "ui/gfx/geometry/vector2d.h" 9 #include "ui/gfx/geometry/vector2d.h"
10 10
11 namespace aura { 11 namespace aura {
12 class Window; 12 class Window;
13 namespace client { 13 namespace client {
14 14
15 enum WindowMoveResult { 15 enum WindowMoveResult {
16 MOVE_SUCCESSFUL, // Moving window was successful. 16 MOVE_SUCCESSFUL, // Moving window was successful.
17 MOVE_CANCELED // Moving window was canceled. 17 MOVE_CANCELED // Moving window was canceled.
18 }; 18 };
19 19
20 enum WindowMoveSource { 20 enum WindowMoveSource {
21 WINDOW_MOVE_SOURCE_MOUSE, 21 WINDOW_MOVE_SOURCE_MOUSE,
22 WINDOW_MOVE_SOURCE_TOUCH, 22 WINDOW_MOVE_SOURCE_TOUCH,
23 }; 23 };
24 24
25 // An interface implemented by an object that manages programatically keyed 25 // An interface implemented by an object that manages programatically keyed
26 // window moving. 26 // window moving.
27 class AURA_EXPORT WindowMoveClient { 27 class AURA_EXPORT WindowMoveClient {
28 public: 28 public:
29 // Starts a nested message loop for moving the window. |drag_offset| is the 29 // Starts a nested run loop for moving the window. |drag_offset| is the
30 // offset from the window origin to the cursor when the drag was started. 30 // offset from the window origin to the cursor when the drag was started.
31 // Returns MOVE_SUCCESSFUL if the move has completed successfully, or 31 // Returns MOVE_SUCCESSFUL if the move has completed successfully, or
32 // MOVE_CANCELED otherwise. 32 // MOVE_CANCELED otherwise.
33 virtual WindowMoveResult RunMoveLoop(Window* window, 33 virtual WindowMoveResult RunMoveLoop(Window* window,
34 const gfx::Vector2d& drag_offset, 34 const gfx::Vector2d& drag_offset,
35 WindowMoveSource source) = 0; 35 WindowMoveSource source) = 0;
36 36
37 // Ends a previously started move loop. 37 // Ends a previously started move loop.
38 virtual void EndMoveLoop() = 0; 38 virtual void EndMoveLoop() = 0;
39 39
40 protected: 40 protected:
41 virtual ~WindowMoveClient() {} 41 virtual ~WindowMoveClient() {}
42 }; 42 };
43 43
44 // Sets/Gets the activation client for the specified window. 44 // Sets/Gets the activation client for the specified window.
45 AURA_EXPORT void SetWindowMoveClient(Window* window, 45 AURA_EXPORT void SetWindowMoveClient(Window* window,
46 WindowMoveClient* client); 46 WindowMoveClient* client);
47 AURA_EXPORT WindowMoveClient* GetWindowMoveClient(Window* window); 47 AURA_EXPORT WindowMoveClient* GetWindowMoveClient(Window* window);
48 48
49 } // namespace client 49 } // namespace client
50 } // namespace aura 50 } // namespace aura
51 51
52 #endif // UI_WM_PUBLIC_WINDOW_MOVE_CLIENT_H_ 52 #endif // UI_WM_PUBLIC_WINDOW_MOVE_CLIENT_H_
OLDNEW
« no previous file with comments | « ui/views/widget/widget.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698