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

Side by Side Diff: ash/aura/wm_shell_aura.h

Issue 2041423002: Moves MruWindowTracker to WmShell (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@move_mru_window_tracker
Patch Set: wm 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
« no previous file with comments | « ash/ash.gyp ('k') | ash/aura/wm_shell_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_AURA_WM_SHELL_AURA_H_ 5 #ifndef ASH_AURA_WM_SHELL_AURA_H_
6 #define ASH_AURA_WM_SHELL_AURA_H_ 6 #define ASH_AURA_WM_SHELL_AURA_H_
7 7
8 #include <set>
9
10 #include "ash/ash_export.h" 8 #include "ash/ash_export.h"
11 #include "ash/aura/wm_lookup_aura.h" 9 #include "ash/aura/wm_lookup_aura.h"
12 #include "ash/common/wm_shell.h" 10 #include "ash/common/wm_shell.h"
13 #include "ash/display/window_tree_host_manager.h" 11 #include "ash/display/window_tree_host_manager.h"
14 #include "ash/shell_observer.h" 12 #include "ash/shell_observer.h"
15 #include "base/macros.h" 13 #include "base/macros.h"
16 #include "base/observer_list.h" 14 #include "base/observer_list.h"
17 #include "ui/wm/public/activation_change_observer.h" 15 #include "ui/wm/public/activation_change_observer.h"
18 16
19 namespace ash { 17 namespace ash {
20 18
19 class WmShellCommon;
20
21 class ASH_EXPORT WmShellAura : public WmShell, 21 class ASH_EXPORT WmShellAura : public WmShell,
22 public aura::client::ActivationChangeObserver, 22 public aura::client::ActivationChangeObserver,
23 public WindowTreeHostManager::Observer, 23 public WindowTreeHostManager::Observer,
24 public ShellObserver { 24 public ShellObserver {
25 public: 25 public:
26 WmShellAura(); 26 // |shell_common| is not owned by this class and must outlive this class.
27 explicit WmShellAura(WmShellCommon* wm_shell_common);
27 ~WmShellAura() override; 28 ~WmShellAura() override;
28 29
29 static WmShellAura* Get(); 30 static WmShellAura* Get();
30 31
31 // WmShell: 32 // WmShell:
33 MruWindowTracker* GetMruWindowTracker() override;
32 WmWindow* NewContainerWindow() override; 34 WmWindow* NewContainerWindow() override;
33 WmWindow* GetFocusedWindow() override; 35 WmWindow* GetFocusedWindow() override;
34 WmWindow* GetActiveWindow() override; 36 WmWindow* GetActiveWindow() override;
35 WmWindow* GetPrimaryRootWindow() override; 37 WmWindow* GetPrimaryRootWindow() override;
36 WmWindow* GetRootWindowForDisplayId(int64_t display_id) override; 38 WmWindow* GetRootWindowForDisplayId(int64_t display_id) override;
37 WmWindow* GetRootWindowForNewWindows() override; 39 WmWindow* GetRootWindowForNewWindows() override;
38 std::vector<WmWindow*> GetMruWindowList() override;
39 std::vector<WmWindow*> GetMruWindowListIgnoreModals() override;
40 bool IsForceMaximizeOnFirstRun() override; 40 bool IsForceMaximizeOnFirstRun() override;
41 bool CanShowWindowForUser(WmWindow* window) override; 41 bool CanShowWindowForUser(WmWindow* window) override;
42 void LockCursor() override; 42 void LockCursor() override;
43 void UnlockCursor() override; 43 void UnlockCursor() override;
44 std::vector<WmWindow*> GetAllRootWindows() override; 44 std::vector<WmWindow*> GetAllRootWindows() override;
45 void RecordUserMetricsAction(wm::WmUserMetricsAction action) override; 45 void RecordUserMetricsAction(wm::WmUserMetricsAction action) override;
46 std::unique_ptr<WindowResizer> CreateDragWindowResizer( 46 std::unique_ptr<WindowResizer> CreateDragWindowResizer(
47 std::unique_ptr<WindowResizer> next_window_resizer, 47 std::unique_ptr<WindowResizer> next_window_resizer,
48 wm::WindowState* window_state) override; 48 wm::WindowState* window_state) override;
49 bool IsOverviewModeSelecting() override; 49 bool IsOverviewModeSelecting() override;
(...skipping 14 matching lines...) Expand all
64 void OnAttemptToReactivateWindow(aura::Window* request_active, 64 void OnAttemptToReactivateWindow(aura::Window* request_active,
65 aura::Window* actual_active) override; 65 aura::Window* actual_active) override;
66 66
67 // WindowTreeHostManager::Observer: 67 // WindowTreeHostManager::Observer:
68 void OnDisplayConfigurationChanging() override; 68 void OnDisplayConfigurationChanging() override;
69 void OnDisplayConfigurationChanged() override; 69 void OnDisplayConfigurationChanged() override;
70 70
71 // ShellObserver: 71 // ShellObserver:
72 void OnOverviewModeEnded() override; 72 void OnOverviewModeEnded() override;
73 73
74 // Owned by Shell.
75 WmShellCommon* wm_shell_common_;
76
74 WmLookupAura wm_lookup_; 77 WmLookupAura wm_lookup_;
75 bool added_activation_observer_ = false; 78 bool added_activation_observer_ = false;
76 base::ObserverList<WmActivationObserver> activation_observers_; 79 base::ObserverList<WmActivationObserver> activation_observers_;
77 80
78 bool added_display_observer_ = false; 81 bool added_display_observer_ = false;
79 base::ObserverList<WmDisplayObserver> display_observers_; 82 base::ObserverList<WmDisplayObserver> display_observers_;
80 83
81 base::ObserverList<WmOverviewModeObserver> overview_mode_observers_; 84 base::ObserverList<WmOverviewModeObserver> overview_mode_observers_;
82 85
83 DISALLOW_COPY_AND_ASSIGN(WmShellAura); 86 DISALLOW_COPY_AND_ASSIGN(WmShellAura);
84 }; 87 };
85 88
86 } // namespace ash 89 } // namespace ash
87 90
88 #endif // ASH_AURA_WM_SHELL_AURA_H_ 91 #endif // ASH_AURA_WM_SHELL_AURA_H_
OLDNEW
« no previous file with comments | « ash/ash.gyp ('k') | ash/aura/wm_shell_aura.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698