OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 MASH_WM_WINDOW_MANAGER_H_ | 5 #ifndef MASH_WM_WINDOW_MANAGER_H_ |
6 #define MASH_WM_WINDOW_MANAGER_H_ | 6 #define MASH_WM_WINDOW_MANAGER_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
11 #include "components/mus/common/types.h" | 11 #include "components/mus/common/types.h" |
12 #include "components/mus/public/cpp/window_manager_delegate.h" | 12 #include "components/mus/public/cpp/window_manager_delegate.h" |
13 #include "components/mus/public/cpp/window_observer.h" | 13 #include "components/mus/public/cpp/window_observer.h" |
14 #include "components/mus/public/interfaces/window_manager.mojom.h" | 14 #include "components/mus/public/interfaces/window_manager.mojom.h" |
15 #include "mash/shell/public/interfaces/shell.mojom.h" | 15 #include "mash/session/public/interfaces/session.mojom.h" |
16 #include "mojo/public/cpp/bindings/binding.h" | 16 #include "mojo/public/cpp/bindings/binding.h" |
17 | 17 |
18 namespace mash { | 18 namespace mash { |
19 namespace wm { | 19 namespace wm { |
20 | 20 |
21 class RootWindowController; | 21 class RootWindowController; |
22 | 22 |
23 class WindowManager : public mus::WindowObserver, | 23 class WindowManager : public mus::WindowObserver, |
24 public mus::WindowManagerDelegate, | 24 public mus::WindowManagerDelegate, |
25 public mash::shell::mojom::ScreenlockStateListener { | 25 public session::mojom::ScreenlockStateListener { |
26 public: | 26 public: |
27 WindowManager(); | 27 WindowManager(); |
28 ~WindowManager() override; | 28 ~WindowManager() override; |
29 | 29 |
30 void Initialize(RootWindowController* root_controller, | 30 void Initialize(RootWindowController* root_controller, |
31 mash::shell::mojom::Shell* shell); | 31 session::mojom::Session* session); |
32 | 32 |
33 mus::WindowManagerClient* window_manager_client() { | 33 mus::WindowManagerClient* window_manager_client() { |
34 return window_manager_client_; | 34 return window_manager_client_; |
35 } | 35 } |
36 | 36 |
37 private: | 37 private: |
38 gfx::Rect CalculateDefaultBounds(mus::Window* window) const; | 38 gfx::Rect CalculateDefaultBounds(mus::Window* window) const; |
39 gfx::Rect GetMaximizedWindowBounds() const; | 39 gfx::Rect GetMaximizedWindowBounds() const; |
40 | 40 |
41 mus::Window* NewTopLevelWindow( | 41 mus::Window* NewTopLevelWindow( |
(...skipping 12 matching lines...) Expand all Loading... |
54 mus::Window* OnWmCreateTopLevelWindow( | 54 mus::Window* OnWmCreateTopLevelWindow( |
55 std::map<std::string, std::vector<uint8_t>>* properties) override; | 55 std::map<std::string, std::vector<uint8_t>>* properties) override; |
56 void OnAccelerator(uint32_t id, const ui::Event& event) override; | 56 void OnAccelerator(uint32_t id, const ui::Event& event) override; |
57 | 57 |
58 // mash::shell::mojom::ScreenlockStateListener: | 58 // mash::shell::mojom::ScreenlockStateListener: |
59 void ScreenlockStateChanged(bool locked) override; | 59 void ScreenlockStateChanged(bool locked) override; |
60 | 60 |
61 RootWindowController* root_controller_; | 61 RootWindowController* root_controller_; |
62 mus::WindowManagerClient* window_manager_client_; | 62 mus::WindowManagerClient* window_manager_client_; |
63 | 63 |
64 mojo::Binding<mash::shell::mojom::ScreenlockStateListener> binding_; | 64 mojo::Binding<session::mojom::ScreenlockStateListener> binding_; |
65 | 65 |
66 DISALLOW_COPY_AND_ASSIGN(WindowManager); | 66 DISALLOW_COPY_AND_ASSIGN(WindowManager); |
67 }; | 67 }; |
68 | 68 |
69 } // namespace wm | 69 } // namespace wm |
70 } // namespace mash | 70 } // namespace mash |
71 | 71 |
72 #endif // MASH_WM_WINDOW_MANAGER_H_ | 72 #endif // MASH_WM_WINDOW_MANAGER_H_ |
OLD | NEW |