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

Side by Side Diff: ash/common/wm_shell_common.h

Issue 2115663002: Folds methods in WmShellCommon to WmShell (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merge Created 4 years, 5 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/common/wm_shell.cc ('k') | ash/common/wm_shell_common.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_COMMON_WM_SHELL_COMMON_H_
6 #define ASH_COMMON_WM_SHELL_COMMON_H_
7
8 #include <memory>
9
10 #include "ash/ash_export.h"
11 #include "base/macros.h"
12 #include "base/observer_list.h"
13
14 namespace ash {
15
16 class MruWindowTracker;
17 class ShellObserver;
18 class WmWindow;
19
20 // Contains code used by both shell implementations.
21 class ASH_EXPORT WmShellCommon {
22 public:
23 WmShellCommon();
24 ~WmShellCommon();
25
26 MruWindowTracker* mru_window_tracker() { return mru_window_tracker_.get(); }
27
28 void CreateMruWindowTracker();
29 void DeleteMruWindowTracker();
30
31 // ShellObserver related functions:
32 void AddShellObserver(ShellObserver* observer);
33 void RemoveShellObserver(ShellObserver* observer);
34 base::ObserverList<ShellObserver>* shell_observers() {
35 return &shell_observers_;
36 }
37
38 // Notifies |observers_| when entering or exiting pinned mode for
39 // |pinned_window|. Entering or exiting can be checked by looking at
40 // |pinned_window|'s window state.
41 void NotifyPinnedStateChanged(WmWindow* pinned_window);
42
43 private:
44 std::unique_ptr<MruWindowTracker> mru_window_tracker_;
45
46 base::ObserverList<ShellObserver> shell_observers_;
47
48 DISALLOW_COPY_AND_ASSIGN(WmShellCommon);
49 };
50
51 } // namespace ash
52
53 #endif // ASH_COMMON_WM_SHELL_COMMON_H_
OLDNEW
« no previous file with comments | « ash/common/wm_shell.cc ('k') | ash/common/wm_shell_common.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698