| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_SERVICE_MANAGER_SERVICE_MANAGER_H_ | 5 #ifndef SERVICES_SERVICE_MANAGER_SERVICE_MANAGER_H_ |
| 6 #define SERVICES_SERVICE_MANAGER_SERVICE_MANAGER_H_ | 6 #define SERVICES_SERVICE_MANAGER_SERVICE_MANAGER_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <memory> | 9 #include <memory> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 75 | 75 |
| 76 // Creates a new Instance identified as |name|. This is intended for use by | 76 // Creates a new Instance identified as |name|. This is intended for use by |
| 77 // the Service Manager's embedder to register itself. This must only be called | 77 // the Service Manager's embedder to register itself. This must only be called |
| 78 // once. | 78 // once. |
| 79 mojom::ServiceRequest StartEmbedderService(const std::string& name); | 79 mojom::ServiceRequest StartEmbedderService(const std::string& name); |
| 80 | 80 |
| 81 private: | 81 private: |
| 82 class Instance; | 82 class Instance; |
| 83 | 83 |
| 84 // Service: | 84 // Service: |
| 85 bool OnConnect(const Identity& remote_identity, | 85 bool OnConnect(const ServiceInfo& remote_info, |
| 86 InterfaceRegistry* registry) override; | 86 InterfaceRegistry* registry) override; |
| 87 | 87 |
| 88 void InitCatalog(mojom::ServicePtr catalog); | 88 void InitCatalog(mojom::ServicePtr catalog); |
| 89 | 89 |
| 90 // Returns the resolver to use for the specified identity. | 90 // Returns the resolver to use for the specified identity. |
| 91 // NOTE: Resolvers are cached to ensure we service requests in order. If | 91 // NOTE: Resolvers are cached to ensure we service requests in order. If |
| 92 // we use a separate Resolver for each request ordering is not | 92 // we use a separate Resolver for each request ordering is not |
| 93 // guaranteed and can lead to random flake. | 93 // guaranteed and can lead to random flake. |
| 94 mojom::Resolver* GetResolver(const Identity& identity); | 94 mojom::Resolver* GetResolver(const Identity& identity); |
| 95 | 95 |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 186 base::WeakPtrFactory<ServiceManager> weak_ptr_factory_; | 186 base::WeakPtrFactory<ServiceManager> weak_ptr_factory_; |
| 187 | 187 |
| 188 DISALLOW_COPY_AND_ASSIGN(ServiceManager); | 188 DISALLOW_COPY_AND_ASSIGN(ServiceManager); |
| 189 }; | 189 }; |
| 190 | 190 |
| 191 mojom::Connector::ConnectCallback EmptyConnectCallback(); | 191 mojom::Connector::ConnectCallback EmptyConnectCallback(); |
| 192 | 192 |
| 193 } // namespace service_manager | 193 } // namespace service_manager |
| 194 | 194 |
| 195 #endif // SERVICES_SERVICE_MANAGER_SERVICE_MANAGER_H_ | 195 #endif // SERVICES_SERVICE_MANAGER_SERVICE_MANAGER_H_ |
| OLD | NEW |