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 CONTENT_COMMON_SERVICE_MANAGER_EMBEDDED_SERVICE_RUNNER_H_ | 5 #ifndef CONTENT_COMMON_SERVICE_MANAGER_EMBEDDED_SERVICE_RUNNER_H_ |
6 #define CONTENT_COMMON_SERVICE_MANAGER_EMBEDDED_SERVICE_RUNNER_H_ | 6 #define CONTENT_COMMON_SERVICE_MANAGER_EMBEDDED_SERVICE_RUNNER_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 | 9 |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
11 #include "base/macros.h" | 11 #include "base/macros.h" |
12 #include "base/memory/ref_counted.h" | 12 #include "base/memory/ref_counted.h" |
13 #include "base/memory/weak_ptr.h" | 13 #include "base/memory/weak_ptr.h" |
14 #include "base/single_thread_task_runner.h" | 14 #include "base/single_thread_task_runner.h" |
15 #include "base/strings/string_piece.h" | 15 #include "base/strings/string_piece.h" |
16 #include "content/public/common/service_info.h" | 16 #include "content/public/common/service_info.h" |
17 #include "services/shell/public/cpp/service.h" | 17 #include "services/service_manager/public/cpp/service.h" |
18 #include "services/shell/public/interfaces/service.mojom.h" | 18 #include "services/service_manager/public/interfaces/service.mojom.h" |
19 | 19 |
20 namespace content { | 20 namespace content { |
21 | 21 |
22 // Hosts an in-process service instance that supports multiple Service | 22 // Hosts an in-process service instance that supports multiple Service |
23 // connections. The first incoming connection will invoke a provided factory | 23 // connections. The first incoming connection will invoke a provided factory |
24 // function to instantiate the service, and the service will automatically be | 24 // function to instantiate the service, and the service will automatically be |
25 // torn down when its last connection is lost. The service may be launched and | 25 // torn down when its last connection is lost. The service may be launched and |
26 // torn down multiple times by a single EmbeddedServiceRunner instance. | 26 // torn down multiple times by a single EmbeddedServiceRunner instance. |
27 class EmbeddedServiceRunner { | 27 class EmbeddedServiceRunner { |
28 public: | 28 public: |
(...skipping 25 matching lines...) Expand all Loading... |
54 base::Closure quit_closure_; | 54 base::Closure quit_closure_; |
55 | 55 |
56 base::WeakPtrFactory<EmbeddedServiceRunner> weak_factory_; | 56 base::WeakPtrFactory<EmbeddedServiceRunner> weak_factory_; |
57 | 57 |
58 DISALLOW_COPY_AND_ASSIGN(EmbeddedServiceRunner); | 58 DISALLOW_COPY_AND_ASSIGN(EmbeddedServiceRunner); |
59 }; | 59 }; |
60 | 60 |
61 } // namespace content | 61 } // namespace content |
62 | 62 |
63 #endif // CONTENT_COMMON_SERVICE_MANAGER_EMBEDDED_SERVICE_RUNNER_H_ | 63 #endif // CONTENT_COMMON_SERVICE_MANAGER_EMBEDDED_SERVICE_RUNNER_H_ |
OLD | NEW |