OLD | NEW |
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 COMPONENTS_MUS_WS_WINDOW_TREE_FACTORY_H_ | 5 #ifndef COMPONENTS_MUS_WS_WINDOW_TREE_FACTORY_H_ |
6 #define COMPONENTS_MUS_WS_WINDOW_TREE_FACTORY_H_ | 6 #define COMPONENTS_MUS_WS_WINDOW_TREE_FACTORY_H_ |
7 | 7 |
8 #include "base/macros.h" | 8 #include "base/macros.h" |
9 #include "components/mus/public/interfaces/window_tree.mojom.h" | 9 #include "components/mus/public/interfaces/window_tree.mojom.h" |
10 #include "mojo/public/cpp/bindings/weak_binding_set.h" | 10 #include "mojo/public/cpp/bindings/binding_set.h" |
11 | 11 |
12 namespace mus { | 12 namespace mus { |
13 namespace ws { | 13 namespace ws { |
14 | 14 |
15 class ConnectionManager; | 15 class ConnectionManager; |
16 | 16 |
17 class WindowTreeFactory : public mus::mojom::WindowTreeFactory { | 17 class WindowTreeFactory : public mus::mojom::WindowTreeFactory { |
18 public: | 18 public: |
19 explicit WindowTreeFactory(ConnectionManager* connection_manager); | 19 explicit WindowTreeFactory(ConnectionManager* connection_manager); |
20 ~WindowTreeFactory() override; | 20 ~WindowTreeFactory() override; |
21 | 21 |
22 void AddBinding( | 22 void AddBinding( |
23 mojo::InterfaceRequest<mus::mojom::WindowTreeFactory> request); | 23 mojo::InterfaceRequest<mus::mojom::WindowTreeFactory> request); |
24 | 24 |
25 // mus::mojom::WindowTreeFactory: | 25 // mus::mojom::WindowTreeFactory: |
26 void CreateWindowTree(mojo::InterfaceRequest<mojom::WindowTree> tree_request, | 26 void CreateWindowTree(mojo::InterfaceRequest<mojom::WindowTree> tree_request, |
27 mojom::WindowTreeClientPtr client) override; | 27 mojom::WindowTreeClientPtr client) override; |
28 | 28 |
29 private: | 29 private: |
30 ConnectionManager* connection_manager_; | 30 ConnectionManager* connection_manager_; |
31 | 31 |
32 mojo::WeakBindingSet<mus::mojom::WindowTreeFactory> binding_; | 32 mojo::BindingSet<mus::mojom::WindowTreeFactory> binding_; |
33 | 33 |
34 DISALLOW_COPY_AND_ASSIGN(WindowTreeFactory); | 34 DISALLOW_COPY_AND_ASSIGN(WindowTreeFactory); |
35 }; | 35 }; |
36 | 36 |
37 } // namespace ws | 37 } // namespace ws |
38 } // namespace mus | 38 } // namespace mus |
39 | 39 |
40 #endif // COMPONENTS_MUS_WS_WINDOW_TREE_FACTORY_H_ | 40 #endif // COMPONENTS_MUS_WS_WINDOW_TREE_FACTORY_H_ |
OLD | NEW |