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

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

Issue 1918883002: Makes Panel related classes use ash/wm/common types (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@phantom_window_controller
Patch Set: feedback Created 4 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
« no previous file with comments | « ash/root_window_controller.cc ('k') | ash/wm/aura/wm_globals_aura.cc » ('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_AURA_WM_GLOBALS_AURA_H_ 5 #ifndef ASH_WM_AURA_WM_GLOBALS_AURA_H_
6 #define ASH_WM_AURA_WM_GLOBALS_AURA_H_ 6 #define ASH_WM_AURA_WM_GLOBALS_AURA_H_
7 7
8 #include <set> 8 #include <set>
9 9
10 #include "ash/ash_export.h" 10 #include "ash/ash_export.h"
11 #include "ash/display/window_tree_host_manager.h"
12 #include "ash/shell_observer.h"
11 #include "ash/wm/common/wm_globals.h" 13 #include "ash/wm/common/wm_globals.h"
12 #include "base/macros.h" 14 #include "base/macros.h"
13 #include "base/observer_list.h" 15 #include "base/observer_list.h"
14 #include "ui/wm/public/activation_change_observer.h" 16 #include "ui/wm/public/activation_change_observer.h"
15 17
16 namespace ash { 18 namespace ash {
17 namespace wm { 19 namespace wm {
18 20
19 class ASH_EXPORT WmGlobalsAura : public WmGlobals, 21 class ASH_EXPORT WmGlobalsAura : public WmGlobals,
20 public aura::client::ActivationChangeObserver { 22 public aura::client::ActivationChangeObserver,
23 public WindowTreeHostManager::Observer,
24 public ShellObserver {
21 public: 25 public:
22 WmGlobalsAura(); 26 WmGlobalsAura();
23 ~WmGlobalsAura() override; 27 ~WmGlobalsAura() override;
24 28
25 static WmGlobalsAura* Get(); 29 static WmGlobalsAura* Get();
26 30
27 // WmGlobals: 31 // WmGlobals:
28 WmWindow* GetFocusedWindow() override; 32 WmWindow* GetFocusedWindow() override;
29 WmWindow* GetActiveWindow() override; 33 WmWindow* GetActiveWindow() override;
30 WmWindow* GetRootWindowForDisplayId(int64_t display_id) override; 34 WmWindow* GetRootWindowForDisplayId(int64_t display_id) override;
31 WmWindow* GetRootWindowForNewWindows() override; 35 WmWindow* GetRootWindowForNewWindows() override;
32 std::vector<WmWindow*> GetMruWindowListIgnoreModals() override; 36 std::vector<WmWindow*> GetMruWindowListIgnoreModals() override;
33 bool IsForceMaximizeOnFirstRun() override; 37 bool IsForceMaximizeOnFirstRun() override;
34 void LockCursor() override; 38 void LockCursor() override;
35 void UnlockCursor() override; 39 void UnlockCursor() override;
36 std::vector<WmWindow*> GetAllRootWindows() override; 40 std::vector<WmWindow*> GetAllRootWindows() override;
37 UserMetricsRecorder* GetUserMetricsRecorder() override; 41 UserMetricsRecorder* GetUserMetricsRecorder() override;
38 void AddActivationObserver(WmActivationObserver* observer) override; 42 void AddActivationObserver(WmActivationObserver* observer) override;
39 void RemoveActivationObserver(WmActivationObserver* observer) override; 43 void RemoveActivationObserver(WmActivationObserver* observer) override;
44 void AddDisplayObserver(WmDisplayObserver* observer) override;
45 void RemoveDisplayObserver(WmDisplayObserver* observer) override;
46 void AddOverviewModeObserver(WmOverviewModeObserver* observer) override;
47 void RemoveOverviewModeObserver(WmOverviewModeObserver* observer) override;
40 48
41 private: 49 private:
42 // aura::client::ActivationChangeObserver: 50 // aura::client::ActivationChangeObserver:
43 void OnWindowActivated(ActivationReason reason, 51 void OnWindowActivated(ActivationReason reason,
44 aura::Window* gained_active, 52 aura::Window* gained_active,
45 aura::Window* lost_active) override; 53 aura::Window* lost_active) override;
46 54
55 // WindowTreeHostManager::Observer:
56 void OnDisplayConfigurationChanged() override;
57
58 // ShellObserver:
59 void OnOverviewModeEnded() override;
60
47 bool added_activation_observer_ = false; 61 bool added_activation_observer_ = false;
48 base::ObserverList<WmActivationObserver> activation_observers_; 62 base::ObserverList<WmActivationObserver> activation_observers_;
49 63
64 bool added_display_observer_ = false;
65 base::ObserverList<WmDisplayObserver> display_observers_;
66
67 base::ObserverList<WmOverviewModeObserver> overview_mode_observers_;
68
50 DISALLOW_COPY_AND_ASSIGN(WmGlobalsAura); 69 DISALLOW_COPY_AND_ASSIGN(WmGlobalsAura);
51 }; 70 };
52 71
53 } // namespace wm 72 } // namespace wm
54 } // namespace ash 73 } // namespace ash
55 74
56 #endif // ASH_WM_AURA_WM_GLOBALS_AURA_H_ 75 #endif // ASH_WM_AURA_WM_GLOBALS_AURA_H_
OLDNEW
« no previous file with comments | « ash/root_window_controller.cc ('k') | ash/wm/aura/wm_globals_aura.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698