| OLD | NEW |
| (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_ | |
| OLD | NEW |