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

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

Issue 209383003: Move wm/public into wm target (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 years, 8 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
« no previous file with comments | « ui/wm/public/transient_window_client.h ('k') | ui/wm/test/wm_test_base.h » ('j') | 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"
9 #include "ui/gfx/vector2d.h" 8 #include "ui/gfx/vector2d.h"
9 #include "ui/wm/wm_export.h"
10 10
11 namespace gfx { 11 namespace gfx {
12 class Point; 12 class Point;
13 } 13 }
14 14
15 namespace aura { 15 namespace aura {
16 class Window; 16 class Window;
17 namespace client { 17 namespace client {
18 18
19 enum WindowMoveResult { 19 enum WindowMoveResult {
20 MOVE_SUCCESSFUL, // Moving window was successful. 20 MOVE_SUCCESSFUL, // Moving window was successful.
21 MOVE_CANCELED // Moving window was canceled. 21 MOVE_CANCELED // Moving window was canceled.
22 }; 22 };
23 23
24 enum WindowMoveSource { 24 enum WindowMoveSource {
25 WINDOW_MOVE_SOURCE_MOUSE, 25 WINDOW_MOVE_SOURCE_MOUSE,
26 WINDOW_MOVE_SOURCE_TOUCH, 26 WINDOW_MOVE_SOURCE_TOUCH,
27 }; 27 };
28 28
29 // An interface implemented by an object that manages programatically keyed 29 // An interface implemented by an object that manages programatically keyed
30 // window moving. 30 // window moving.
31 class AURA_EXPORT WindowMoveClient { 31 class WM_EXPORT WindowMoveClient {
32 public: 32 public:
33 // Starts a nested message loop for moving the window. |drag_offset| is the 33 // Starts a nested message loop for moving the window. |drag_offset| is the
34 // offset from the window origin to the cursor when the drag was started. 34 // offset from the window origin to the cursor when the drag was started.
35 // Returns MOVE_SUCCESSFUL if the move has completed successfully, or 35 // Returns MOVE_SUCCESSFUL if the move has completed successfully, or
36 // MOVE_CANCELED otherwise. 36 // MOVE_CANCELED otherwise.
37 virtual WindowMoveResult RunMoveLoop(Window* window, 37 virtual WindowMoveResult RunMoveLoop(Window* window,
38 const gfx::Vector2d& drag_offset, 38 const gfx::Vector2d& drag_offset,
39 WindowMoveSource source) = 0; 39 WindowMoveSource source) = 0;
40 40
41 // Ends a previously started move loop. 41 // Ends a previously started move loop.
42 virtual void EndMoveLoop() = 0; 42 virtual void EndMoveLoop() = 0;
43 43
44 protected: 44 protected:
45 virtual ~WindowMoveClient() {} 45 virtual ~WindowMoveClient() {}
46 }; 46 };
47 47
48 // Sets/Gets the activation client for the specified window. 48 // Sets/Gets the activation client for the specified window.
49 AURA_EXPORT void SetWindowMoveClient(Window* window, 49 WM_EXPORT void SetWindowMoveClient(Window* window, WindowMoveClient* client);
50 WindowMoveClient* client); 50 WM_EXPORT WindowMoveClient* GetWindowMoveClient(Window* window);
51 AURA_EXPORT WindowMoveClient* GetWindowMoveClient(Window* window);
52 51
53 } // namespace client 52 } // namespace client
54 } // namespace aura 53 } // namespace aura
55 54
56 #endif // UI_WM_PUBLIC_WINDOW_MOVE_CLIENT_H_ 55 #endif // UI_WM_PUBLIC_WINDOW_MOVE_CLIENT_H_
OLDNEW
« no previous file with comments | « ui/wm/public/transient_window_client.h ('k') | ui/wm/test/wm_test_base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698