| 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_MANAGER_FACTORY_SERVICE_H_ | 5 #ifndef COMPONENTS_MUS_WS_WINDOW_MANAGER_FACTORY_SERVICE_H_ |
| 6 #define COMPONENTS_MUS_WS_WINDOW_MANAGER_FACTORY_SERVICE_H_ | 6 #define COMPONENTS_MUS_WS_WINDOW_MANAGER_FACTORY_SERVICE_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include "components/mus/public/interfaces/window_manager_factory.mojom.h" | 10 #include "components/mus/public/interfaces/window_manager_factory.mojom.h" |
| 11 #include "mojo/public/cpp/bindings/binding.h" | 11 #include "mojo/public/cpp/bindings/binding.h" |
| 12 | 12 |
| 13 namespace mus { | 13 namespace mus { |
| 14 namespace ws { | 14 namespace ws { |
| 15 | 15 |
| 16 class ServerWindow; | 16 class ServerWindow; |
| 17 class WindowManagerFactoryRegistry; |
| 17 | 18 |
| 18 class WindowManagerFactoryService : public mojom::WindowManagerFactoryService { | 19 class WindowManagerFactoryService : public mojom::WindowManagerFactoryService { |
| 19 public: | 20 public: |
| 20 explicit WindowManagerFactoryService( | 21 WindowManagerFactoryService( |
| 22 WindowManagerFactoryRegistry* registry, |
| 23 uint32_t user_id, |
| 21 mojo::InterfaceRequest<mojom::WindowManagerFactoryService> request); | 24 mojo::InterfaceRequest<mojom::WindowManagerFactoryService> request); |
| 22 ~WindowManagerFactoryService() override; | 25 ~WindowManagerFactoryService() override; |
| 23 | 26 |
| 27 uint32_t user_id() const { return user_id_; } |
| 28 |
| 24 mojom::WindowManagerFactory* window_manager_factory() { | 29 mojom::WindowManagerFactory* window_manager_factory() { |
| 25 return window_manager_factory_.get(); | 30 return window_manager_factory_.get(); |
| 26 } | 31 } |
| 27 | 32 |
| 28 // mojom::WindowManagerFactoryService: | 33 // mojom::WindowManagerFactoryService: |
| 29 void SetWindowManagerFactory(mojom::WindowManagerFactoryPtr factory) override; | 34 void SetWindowManagerFactory(mojom::WindowManagerFactoryPtr factory) override; |
| 30 | 35 |
| 31 private: | 36 private: |
| 37 void OnConnectionLost(); |
| 38 |
| 39 WindowManagerFactoryRegistry* registry_; |
| 40 const uint32_t user_id_; |
| 32 mojo::Binding<mojom::WindowManagerFactoryService> binding_; | 41 mojo::Binding<mojom::WindowManagerFactoryService> binding_; |
| 33 mojom::WindowManagerFactoryPtr window_manager_factory_; | 42 mojom::WindowManagerFactoryPtr window_manager_factory_; |
| 34 | 43 |
| 35 DISALLOW_COPY_AND_ASSIGN(WindowManagerFactoryService); | 44 DISALLOW_COPY_AND_ASSIGN(WindowManagerFactoryService); |
| 36 }; | 45 }; |
| 37 | 46 |
| 38 } // namespace ws | 47 } // namespace ws |
| 39 } // namespace mus | 48 } // namespace mus |
| 40 | 49 |
| 41 #endif // COMPONENTS_MUS_WS_WINDOW_MANAGER_FACTORY_SERVICE_H_ | 50 #endif // COMPONENTS_MUS_WS_WINDOW_MANAGER_FACTORY_SERVICE_H_ |
| OLD | NEW |