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

Side by Side Diff: ash/wm/aura/wm_globals_aura.h

Issue 2035543004: Shuffles and renames ash/common/wm classes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: random changes for chrome tests Created 4 years, 6 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
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef ASH_WM_AURA_WM_GLOBALS_AURA_H_
6 #define ASH_WM_AURA_WM_GLOBALS_AURA_H_
7
8 #include <set>
9
10 #include "ash/ash_export.h"
11 #include "ash/common/wm/wm_globals.h"
12 #include "ash/display/window_tree_host_manager.h"
13 #include "ash/shell_observer.h"
14 #include "ash/wm/aura/wm_lookup_aura.h"
15 #include "base/macros.h"
16 #include "base/observer_list.h"
17 #include "ui/wm/public/activation_change_observer.h"
18
19 namespace ash {
20 namespace wm {
21
22 class ASH_EXPORT WmGlobalsAura : public WmGlobals,
23 public aura::client::ActivationChangeObserver,
24 public WindowTreeHostManager::Observer,
25 public ShellObserver {
26 public:
27 WmGlobalsAura();
28 ~WmGlobalsAura() override;
29
30 static WmGlobalsAura* Get();
31
32 // WmGlobals:
33 WmWindow* NewContainerWindow() override;
34 WmWindow* GetFocusedWindow() override;
35 WmWindow* GetActiveWindow() override;
36 WmWindow* GetPrimaryRootWindow() override;
37 WmWindow* GetRootWindowForDisplayId(int64_t display_id) override;
38 WmWindow* GetRootWindowForNewWindows() override;
39 std::vector<WmWindow*> GetMruWindowList() override;
40 std::vector<WmWindow*> GetMruWindowListIgnoreModals() override;
41 bool IsForceMaximizeOnFirstRun() override;
42 bool IsUserSessionBlocked() override;
43 bool IsScreenLocked() override;
44 void LockCursor() override;
45 void UnlockCursor() override;
46 std::vector<WmWindow*> GetAllRootWindows() override;
47 void RecordUserMetricsAction(WmUserMetricsAction action) override;
48 std::unique_ptr<WindowResizer> CreateDragWindowResizer(
49 std::unique_ptr<WindowResizer> next_window_resizer,
50 wm::WindowState* window_state) override;
51 bool IsOverviewModeSelecting() override;
52 bool IsOverviewModeRestoringMinimizedWindows() override;
53 void AddActivationObserver(WmActivationObserver* observer) override;
54 void RemoveActivationObserver(WmActivationObserver* observer) override;
55 void AddDisplayObserver(WmDisplayObserver* observer) override;
56 void RemoveDisplayObserver(WmDisplayObserver* observer) override;
57 void AddOverviewModeObserver(WmOverviewModeObserver* observer) override;
58 void RemoveOverviewModeObserver(WmOverviewModeObserver* observer) override;
59
60 private:
61 // aura::client::ActivationChangeObserver:
62 void OnWindowActivated(ActivationReason reason,
63 aura::Window* gained_active,
64 aura::Window* lost_active) override;
65 void OnAttemptToReactivateWindow(aura::Window* request_active,
66 aura::Window* actual_active) override;
67
68 // WindowTreeHostManager::Observer:
69 void OnDisplayConfigurationChanging() override;
70 void OnDisplayConfigurationChanged() override;
71
72 // ShellObserver:
73 void OnOverviewModeEnded() override;
74
75 WmLookupAura wm_lookup_;
76 bool added_activation_observer_ = false;
77 base::ObserverList<WmActivationObserver> activation_observers_;
78
79 bool added_display_observer_ = false;
80 base::ObserverList<WmDisplayObserver> display_observers_;
81
82 base::ObserverList<WmOverviewModeObserver> overview_mode_observers_;
83
84 DISALLOW_COPY_AND_ASSIGN(WmGlobalsAura);
85 };
86
87 } // namespace wm
88 } // namespace ash
89
90 #endif // ASH_WM_AURA_WM_GLOBALS_AURA_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698