OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 CONTENT_BROWSER_SERVICE_MANAGER_SERVICE_MANAGER_CONTEXT_H_ | 5 #ifndef CONTENT_BROWSER_SERVICE_MANAGER_SERVICE_MANAGER_CONTEXT_H_ |
6 #define CONTENT_BROWSER_SERVICE_MANAGER_SERVICE_MANAGER_CONTEXT_H_ | 6 #define CONTENT_BROWSER_SERVICE_MANAGER_SERVICE_MANAGER_CONTEXT_H_ |
7 | 7 |
8 #include "base/macros.h" | 8 #include "base/macros.h" |
9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
10 #include "content/common/content_export.h" | 10 #include "content/common/content_export.h" |
11 | 11 |
12 namespace service_manager { | 12 namespace service_manager { |
13 class Connector; | 13 class Connector; |
14 } | 14 } |
15 | 15 |
16 namespace content { | 16 namespace content { |
17 | 17 |
| 18 class ServiceManagerConnection; |
| 19 |
18 // ServiceManagerContext manages the browser's connection to the ServiceManager, | 20 // ServiceManagerContext manages the browser's connection to the ServiceManager, |
19 // hosting a new in-process ServiceManagerContext if the browser was not | 21 // hosting a new in-process ServiceManagerContext if the browser was not |
20 // launched from an external one. | 22 // launched from an external one. |
21 class CONTENT_EXPORT ServiceManagerContext { | 23 class CONTENT_EXPORT ServiceManagerContext { |
22 public: | 24 public: |
23 ServiceManagerContext(); | 25 ServiceManagerContext(); |
24 ~ServiceManagerContext(); | 26 ~ServiceManagerContext(); |
25 | 27 |
26 // Returns a service_manager::Connector that can be used on the IO thread. | 28 // Returns a service_manager::Connector that can be used on the IO thread. |
27 static service_manager::Connector* GetConnectorForIOThread(); | 29 static service_manager::Connector* GetConnectorForIOThread(); |
28 | 30 |
29 private: | 31 private: |
30 class InProcessServiceManagerContext; | 32 class InProcessServiceManagerContext; |
31 | 33 |
32 scoped_refptr<InProcessServiceManagerContext> in_process_context_; | 34 scoped_refptr<InProcessServiceManagerContext> in_process_context_; |
| 35 std::unique_ptr<ServiceManagerConnection> packaged_services_connection_; |
33 | 36 |
34 DISALLOW_COPY_AND_ASSIGN(ServiceManagerContext); | 37 DISALLOW_COPY_AND_ASSIGN(ServiceManagerContext); |
35 }; | 38 }; |
36 | 39 |
37 } // namespace content | 40 } // namespace content |
38 | 41 |
39 #endif // CONTENT_BROWSER_SERVICE_MANAGER_SERVICE_MANAGER_CONTEXT_H_ | 42 #endif // CONTENT_BROWSER_SERVICE_MANAGER_SERVICE_MANAGER_CONTEXT_H_ |
OLD | NEW |