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

Side by Side Diff: ash/wm/common/wm_globals.h

Issue 1929023002: Refactors WindowResizers to use ash/wm/common (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: move forward declaration Created 4 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 | « ash/wm/common/shelf/wm_shelf_util.cc ('k') | ash/wm/common/wm_shell_window_ids.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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 ASH_WM_COMMON_WM_GLOBALS_H_ 5 #ifndef ASH_WM_COMMON_WM_GLOBALS_H_
6 #define ASH_WM_COMMON_WM_GLOBALS_H_ 6 #define ASH_WM_COMMON_WM_GLOBALS_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory>
10 #include <vector> 11 #include <vector>
11 12
12 #include "ash/ash_export.h" 13 #include "ash/ash_export.h"
13 14
14 namespace gfx { 15 namespace gfx {
15 class Rect; 16 class Rect;
16 } 17 }
17 18
18 namespace ash { 19 namespace ash {
19 20
20 class UserMetricsRecorder; 21 class WindowResizer;
21 22
22 namespace wm { 23 namespace wm {
23 24
25 class WindowState;
24 class WmActivationObserver; 26 class WmActivationObserver;
25 class WmDisplayObserver; 27 class WmDisplayObserver;
26 class WmOverviewModeObserver; 28 class WmOverviewModeObserver;
27 class WmWindow; 29 class WmWindow;
28 30
31 enum class WmUserMetricsAction;
32
29 // Used for accessing global state. 33 // Used for accessing global state.
30 class ASH_EXPORT WmGlobals { 34 class ASH_EXPORT WmGlobals {
31 public: 35 public:
32 virtual ~WmGlobals() {} 36 virtual ~WmGlobals() {}
33 37
34 // This is necessary for a handful of places that is difficult to plumb 38 // This is necessary for a handful of places that is difficult to plumb
35 // through context. 39 // through context.
36 static WmGlobals* Get(); 40 static WmGlobals* Get();
37 41
38 virtual WmWindow* GetFocusedWindow() = 0; 42 virtual WmWindow* GetFocusedWindow() = 0;
(...skipping 16 matching lines...) Expand all
55 virtual bool IsForceMaximizeOnFirstRun() = 0; 59 virtual bool IsForceMaximizeOnFirstRun() = 0;
56 60
57 virtual bool IsScreenLocked() = 0; 61 virtual bool IsScreenLocked() = 0;
58 62
59 // See aura::client::CursorClient for details on these. 63 // See aura::client::CursorClient for details on these.
60 virtual void LockCursor() = 0; 64 virtual void LockCursor() = 0;
61 virtual void UnlockCursor() = 0; 65 virtual void UnlockCursor() = 0;
62 66
63 virtual std::vector<WmWindow*> GetAllRootWindows() = 0; 67 virtual std::vector<WmWindow*> GetAllRootWindows() = 0;
64 68
65 virtual UserMetricsRecorder* GetUserMetricsRecorder() = 0; 69 virtual void RecordUserMetricsAction(WmUserMetricsAction action) = 0;
70
71 // Returns a WindowResizer to handle dragging. |next_window_resizer| is
72 // the next WindowResizer in the WindowResizer chain. This may return
73 // |next_window_resizer|.
74 virtual std::unique_ptr<WindowResizer> CreateDragWindowResizer(
75 std::unique_ptr<WindowResizer> next_window_resizer,
76 wm::WindowState* window_state) = 0;
77
78 // TODO(sky): if WindowSelectorController can't be moved over, move these
79 // onto their own local class.
80 virtual bool IsOverviewModeSelecting() = 0;
81 virtual bool IsOverviewModeRestoringMinimizedWindows() = 0;
66 82
67 virtual void AddActivationObserver(WmActivationObserver* observer) = 0; 83 virtual void AddActivationObserver(WmActivationObserver* observer) = 0;
68 virtual void RemoveActivationObserver(WmActivationObserver* observer) = 0; 84 virtual void RemoveActivationObserver(WmActivationObserver* observer) = 0;
69 85
70 virtual void AddDisplayObserver(WmDisplayObserver* observer) = 0; 86 virtual void AddDisplayObserver(WmDisplayObserver* observer) = 0;
71 virtual void RemoveDisplayObserver(WmDisplayObserver* observer) = 0; 87 virtual void RemoveDisplayObserver(WmDisplayObserver* observer) = 0;
72 88
73 virtual void AddOverviewModeObserver(WmOverviewModeObserver* observer) = 0; 89 virtual void AddOverviewModeObserver(WmOverviewModeObserver* observer) = 0;
74 virtual void RemoveOverviewModeObserver(WmOverviewModeObserver* observer) = 0; 90 virtual void RemoveOverviewModeObserver(WmOverviewModeObserver* observer) = 0;
75 }; 91 };
76 92
77 } // namespace wm 93 } // namespace wm
78 } // namespace ash 94 } // namespace ash
79 95
80 #endif // ASH_WM_COMMON_WM_GLOBALS_H_ 96 #endif // ASH_WM_COMMON_WM_GLOBALS_H_
OLDNEW
« no previous file with comments | « ash/wm/common/shelf/wm_shelf_util.cc ('k') | ash/wm/common/wm_shell_window_ids.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698