| 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 SERVICES_UI_WS_WINDOW_MANAGER_WINDOW_TREE_FACTORY_H_ | 5 #ifndef SERVICES_UI_WS_WINDOW_MANAGER_WINDOW_TREE_FACTORY_H_ |
| 6 #define SERVICES_UI_WS_WINDOW_MANAGER_WINDOW_TREE_FACTORY_H_ | 6 #define SERVICES_UI_WS_WINDOW_MANAGER_WINDOW_TREE_FACTORY_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include "mojo/public/cpp/bindings/binding.h" | 10 #include "mojo/public/cpp/bindings/binding.h" |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 class WindowManagerWindowTreeFactorySetTestApi; | 23 class WindowManagerWindowTreeFactorySetTestApi; |
| 24 } | 24 } |
| 25 | 25 |
| 26 // Implementation of mojom::WindowManagerWindowTreeFactory. | 26 // Implementation of mojom::WindowManagerWindowTreeFactory. |
| 27 class WindowManagerWindowTreeFactory | 27 class WindowManagerWindowTreeFactory |
| 28 : public mojom::WindowManagerWindowTreeFactory { | 28 : public mojom::WindowManagerWindowTreeFactory { |
| 29 public: | 29 public: |
| 30 WindowManagerWindowTreeFactory( | 30 WindowManagerWindowTreeFactory( |
| 31 WindowManagerWindowTreeFactorySet* window_manager_window_tree_factory_set, | 31 WindowManagerWindowTreeFactorySet* window_manager_window_tree_factory_set, |
| 32 const UserId& user_id, | 32 const UserId& user_id, |
| 33 const std::string& client_name, |
| 33 mojo::InterfaceRequest<mojom::WindowManagerWindowTreeFactory> request); | 34 mojo::InterfaceRequest<mojom::WindowManagerWindowTreeFactory> request); |
| 34 ~WindowManagerWindowTreeFactory() override; | 35 ~WindowManagerWindowTreeFactory() override; |
| 35 | 36 |
| 36 const UserId& user_id() const { return user_id_; } | 37 const UserId& user_id() const { return user_id_; } |
| 37 | 38 |
| 38 WindowTree* window_tree() { return window_tree_; } | 39 WindowTree* window_tree() { return window_tree_; } |
| 39 | 40 |
| 40 // mojom::WindowManagerWindowTreeFactory: | 41 // mojom::WindowManagerWindowTreeFactory: |
| 41 void CreateWindowTree(mojom::WindowTreeRequest window_tree_request, | 42 void CreateWindowTree(mojom::WindowTreeRequest window_tree_request, |
| 42 mojom::WindowTreeClientPtr window_tree_client) override; | 43 mojom::WindowTreeClientPtr window_tree_client) override; |
| 43 | 44 |
| 44 private: | 45 private: |
| 45 friend class test::WindowManagerWindowTreeFactorySetTestApi; | 46 friend class test::WindowManagerWindowTreeFactorySetTestApi; |
| 46 | 47 |
| 47 // Used by tests. | 48 // Used by tests. |
| 48 WindowManagerWindowTreeFactory(WindowManagerWindowTreeFactorySet* registry, | 49 WindowManagerWindowTreeFactory(WindowManagerWindowTreeFactorySet* registry, |
| 49 const UserId& user_id); | 50 const UserId& user_id); |
| 50 | 51 |
| 51 WindowServer* GetWindowServer(); | 52 WindowServer* GetWindowServer(); |
| 52 | 53 |
| 53 void SetWindowTree(WindowTree* window_tree); | 54 void SetWindowTree(WindowTree* window_tree); |
| 54 | 55 |
| 55 WindowManagerWindowTreeFactorySet* window_manager_window_tree_factory_set_; | 56 WindowManagerWindowTreeFactorySet* window_manager_window_tree_factory_set_; |
| 56 const UserId user_id_; | 57 const UserId user_id_; |
| 58 const std::string client_name_; |
| 57 mojo::Binding<mojom::WindowManagerWindowTreeFactory> binding_; | 59 mojo::Binding<mojom::WindowManagerWindowTreeFactory> binding_; |
| 58 | 60 |
| 59 // Owned by WindowServer. | 61 // Owned by WindowServer. |
| 60 WindowTree* window_tree_; | 62 WindowTree* window_tree_; |
| 61 | 63 |
| 62 DISALLOW_COPY_AND_ASSIGN(WindowManagerWindowTreeFactory); | 64 DISALLOW_COPY_AND_ASSIGN(WindowManagerWindowTreeFactory); |
| 63 }; | 65 }; |
| 64 | 66 |
| 65 } // namespace ws | 67 } // namespace ws |
| 66 } // namespace ui | 68 } // namespace ui |
| 67 | 69 |
| 68 #endif // SERVICES_UI_WS_WINDOW_MANAGER_WINDOW_TREE_FACTORY_H_ | 70 #endif // SERVICES_UI_WS_WINDOW_MANAGER_WINDOW_TREE_FACTORY_H_ |
| OLD | NEW |