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_GPU_GPU_SERVICE_FACTORY_H_ | 5 #ifndef CONTENT_GPU_GPU_SERVICE_FACTORY_H_ |
6 #define CONTENT_GPU_GPU_SERVICE_FACTORY_H_ | 6 #define CONTENT_GPU_GPU_SERVICE_FACTORY_H_ |
7 | 7 |
8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "base/memory/ref_counted.h" |
| 10 #include "base/threading/thread_task_runner_handle.h" |
9 #include "content/child/service_factory.h" | 11 #include "content/child/service_factory.h" |
10 | 12 |
| 13 namespace media { |
| 14 class MediaService; |
| 15 } // namespace media |
| 16 |
11 namespace content { | 17 namespace content { |
12 | 18 |
13 // Customization of ServiceFactory for the GPU process. | 19 // Customization of ServiceFactory for the GPU process. |
14 class GpuServiceFactory : public ServiceFactory { | 20 class GpuServiceFactory : public ServiceFactory { |
15 public: | 21 public: |
16 GpuServiceFactory(); | 22 GpuServiceFactory( |
| 23 scoped_refptr<base::SingleThreadTaskRunner> media_service_task_runner, |
| 24 media::MediaService* media_service); |
17 ~GpuServiceFactory() override; | 25 ~GpuServiceFactory() override; |
18 | 26 |
19 // ServiceFactory overrides: | 27 // ServiceFactory overrides: |
20 void RegisterServices(ServiceMap* services) override; | 28 void RegisterServices(ServiceMap* services) override; |
21 | 29 |
22 private: | 30 private: |
| 31 scoped_refptr<base::SingleThreadTaskRunner> media_service_task_runner_; |
| 32 media::MediaService* media_service_; |
| 33 |
23 DISALLOW_COPY_AND_ASSIGN(GpuServiceFactory); | 34 DISALLOW_COPY_AND_ASSIGN(GpuServiceFactory); |
24 }; | 35 }; |
25 | 36 |
26 } // namespace content | 37 } // namespace content |
27 | 38 |
28 #endif // CONTENT_GPU_GPU_SERVICE_FACTORY_H_ | 39 #endif // CONTENT_GPU_GPU_SERVICE_FACTORY_H_ |
OLD | NEW |