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 ASH_MUS_WINDOW_MANAGER_H_ | 5 #ifndef ASH_MUS_WINDOW_MANAGER_H_ |
6 #define ASH_MUS_WINDOW_MANAGER_H_ | 6 #define ASH_MUS_WINDOW_MANAGER_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
11 #include <set> | 11 #include <set> |
12 | 12 |
13 #include "base/macros.h" | 13 #include "base/macros.h" |
| 14 #include "base/memory/ref_counted.h" |
14 #include "base/observer_list.h" | 15 #include "base/observer_list.h" |
15 #include "services/ui/common/types.h" | 16 #include "services/ui/common/types.h" |
16 #include "services/ui/public/cpp/window_manager_delegate.h" | 17 #include "services/ui/public/cpp/window_manager_delegate.h" |
17 #include "services/ui/public/cpp/window_observer.h" | 18 #include "services/ui/public/cpp/window_observer.h" |
18 #include "services/ui/public/cpp/window_tree_client_delegate.h" | 19 #include "services/ui/public/cpp/window_tree_client_delegate.h" |
19 #include "services/ui/public/interfaces/window_manager.mojom.h" | 20 #include "services/ui/public/interfaces/window_manager.mojom.h" |
20 | 21 |
| 22 namespace base { |
| 23 class SequencedWorkerPool; |
| 24 } |
| 25 |
21 namespace display { | 26 namespace display { |
22 class Display; | 27 class Display; |
23 class ScreenBase; | 28 class ScreenBase; |
24 } | 29 } |
25 | 30 |
26 namespace shell { | 31 namespace shell { |
27 class Connector; | 32 class Connector; |
28 } | 33 } |
29 | 34 |
30 namespace views { | 35 namespace views { |
(...skipping 15 matching lines...) Expand all Loading... |
46 // WindowTreeClientDelegate for mash. WindowManager creates (and owns) | 51 // WindowTreeClientDelegate for mash. WindowManager creates (and owns) |
47 // a RootWindowController per Display. WindowManager takes ownership of | 52 // a RootWindowController per Display. WindowManager takes ownership of |
48 // the WindowTreeClient. | 53 // the WindowTreeClient. |
49 class WindowManager : public ui::WindowManagerDelegate, | 54 class WindowManager : public ui::WindowManagerDelegate, |
50 public ui::WindowObserver, | 55 public ui::WindowObserver, |
51 public ui::WindowTreeClientDelegate { | 56 public ui::WindowTreeClientDelegate { |
52 public: | 57 public: |
53 explicit WindowManager(shell::Connector* connector); | 58 explicit WindowManager(shell::Connector* connector); |
54 ~WindowManager() override; | 59 ~WindowManager() override; |
55 | 60 |
56 void Init(std::unique_ptr<ui::WindowTreeClient> window_tree_client); | 61 void Init(std::unique_ptr<ui::WindowTreeClient> window_tree_client, |
| 62 const scoped_refptr<base::SequencedWorkerPool>& blocking_pool); |
57 | 63 |
58 WmShellMus* shell() { return shell_.get(); } | 64 WmShellMus* shell() { return shell_.get(); } |
59 | 65 |
60 ui::WindowTreeClient* window_tree_client() { | 66 ui::WindowTreeClient* window_tree_client() { |
61 return window_tree_client_.get(); | 67 return window_tree_client_.get(); |
62 } | 68 } |
63 | 69 |
64 ui::WindowManagerClient* window_manager_client() { | 70 ui::WindowManagerClient* window_manager_client() { |
65 return window_manager_client_; | 71 return window_manager_client_; |
66 } | 72 } |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
150 std::map<uint16_t, AcceleratorHandler*> accelerator_handlers_; | 156 std::map<uint16_t, AcceleratorHandler*> accelerator_handlers_; |
151 uint16_t next_accelerator_namespace_id_ = 0u; | 157 uint16_t next_accelerator_namespace_id_ = 0u; |
152 | 158 |
153 DISALLOW_COPY_AND_ASSIGN(WindowManager); | 159 DISALLOW_COPY_AND_ASSIGN(WindowManager); |
154 }; | 160 }; |
155 | 161 |
156 } // namespace mus | 162 } // namespace mus |
157 } // namespace ash | 163 } // namespace ash |
158 | 164 |
159 #endif // ASH_MUS_WINDOW_MANAGER_H_ | 165 #endif // ASH_MUS_WINDOW_MANAGER_H_ |
OLD | NEW |