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 SKY_SHELL_SERVICE_PROVIDER_H_ | 5 #ifndef SKY_SHELL_SERVICE_PROVIDER_H_ |
6 #define SKY_SHELL_SERVICE_PROVIDER_H_ | 6 #define SKY_SHELL_SERVICE_PROVIDER_H_ |
7 | 7 |
8 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
9 #include "mojo/public/cpp/system/core.h" | 9 #include "mojo/public/cpp/system/core.h" |
10 #include "mojo/public/interfaces/application/service_provider.mojom.h" | 10 #include "mojo/public/interfaces/application/service_provider.mojom.h" |
11 | 11 |
12 namespace base { | 12 namespace base { |
13 class SingleThreadTaskRunner; | 13 class SingleThreadTaskRunner; |
14 } | 14 } |
15 | 15 |
16 namespace sky { | 16 namespace sky { |
17 namespace shell { | 17 namespace shell { |
18 | 18 |
19 class ServiceProviderContext { | 19 class ServiceProviderContext { |
20 public: | 20 public: |
21 ServiceProviderContext(scoped_refptr<base::SingleThreadTaskRunner> runner) | 21 ServiceProviderContext(scoped_refptr<base::SingleThreadTaskRunner> runner); |
22 : platform_task_runner(runner.Pass()) {} | 22 ~ServiceProviderContext(); |
23 | 23 |
24 scoped_refptr<base::SingleThreadTaskRunner> platform_task_runner; | 24 scoped_refptr<base::SingleThreadTaskRunner> platform_task_runner; |
25 }; | 25 }; |
26 | 26 |
27 // Implemented in platform_service_provider.cc for each platform. | 27 // Implemented in platform_service_provider.cc for each platform. |
28 mojo::ServiceProviderPtr CreateServiceProvider(ServiceProviderContext* context); | 28 mojo::ServiceProviderPtr CreateServiceProvider(ServiceProviderContext* context); |
29 | 29 |
30 } // namespace shell | 30 } // namespace shell |
31 } // namespace sky | 31 } // namespace sky |
32 | 32 |
33 #endif // SKY_SHELL_SERVICE_PROVIDER_H_ | 33 #endif // SKY_SHELL_SERVICE_PROVIDER_H_ |
OLD | NEW |