| OLD | NEW |
| (Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef COMPONENTS_MUS_WS_WINDOW_MANAGER_FACTORY_REGISTRY_H_ |
| 6 #define COMPONENTS_MUS_WS_WINDOW_MANAGER_FACTORY_REGISTRY_H_ |
| 7 |
| 8 #include <stdint.h> |
| 9 |
| 10 #include <vector> |
| 11 |
| 12 #include "base/macros.h" |
| 13 #include "base/memory/scoped_ptr.h" |
| 14 #include "components/mus/public/interfaces/window_manager_factory.mojom.h" |
| 15 |
| 16 namespace mus { |
| 17 namespace ws { |
| 18 |
| 19 class ConnectionManager; |
| 20 class WindowManagerFactoryService; |
| 21 |
| 22 // WindowManagerFactoryRegistry tracks the set of registered |
| 23 // WindowManagerFactoryServices. |
| 24 class WindowManagerFactoryRegistry { |
| 25 public: |
| 26 explicit WindowManagerFactoryRegistry(ConnectionManager* connection_manager); |
| 27 ~WindowManagerFactoryRegistry(); |
| 28 |
| 29 void Register( |
| 30 uint32_t user_id, |
| 31 mojo::InterfaceRequest<mojom::WindowManagerFactoryService> request); |
| 32 |
| 33 std::vector<WindowManagerFactoryService*> GetServices(); |
| 34 |
| 35 private: |
| 36 friend class WindowManagerFactoryService; |
| 37 |
| 38 void OnWindowManagerFactoryConnectionLost( |
| 39 WindowManagerFactoryService* service); |
| 40 void OnWindowManagerFactorySet(); |
| 41 |
| 42 ConnectionManager* connection_manager_; |
| 43 |
| 44 std::vector<scoped_ptr<WindowManagerFactoryService>> services_; |
| 45 |
| 46 DISALLOW_COPY_AND_ASSIGN(WindowManagerFactoryRegistry); |
| 47 }; |
| 48 |
| 49 } // namespace ws |
| 50 } // namespace mus |
| 51 |
| 52 #endif // COMPONENTS_MUS_WS_WINDOW_MANAGER_FACTORY_REGISTRY_H_ |
| OLD | NEW |