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 CHROME_GPU_CHROME_CONTENT_GPU_CLIENT_H_ | 5 #ifndef CHROME_GPU_CHROME_CONTENT_GPU_CLIENT_H_ |
6 #define CHROME_GPU_CHROME_CONTENT_GPU_CLIENT_H_ | 6 #define CHROME_GPU_CHROME_CONTENT_GPU_CLIENT_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
11 #include "base/profiler/stack_sampling_profiler.h" | 11 #include "base/profiler/stack_sampling_profiler.h" |
12 #include "components/variations/child_process_field_trial_syncer.h" | 12 #include "components/variations/child_process_field_trial_syncer.h" |
13 #include "content/public/gpu/content_gpu_client.h" | 13 #include "content/public/gpu/content_gpu_client.h" |
14 | 14 |
15 #if defined(OS_CHROMEOS) | 15 #if defined(OS_CHROMEOS) |
16 #include "chrome/gpu/gpu_arc_video_decode_accelerator.h" | 16 #include "components/arc/common/video_decode_accelerator.mojom.h" |
| 17 #include "components/arc/common/video_encode_accelerator.mojom.h" |
| 18 #include "gpu/command_buffer/service/gpu_preferences.h" |
17 | 19 |
18 namespace service_manager { | 20 namespace service_manager { |
19 struct BindSourceInfo; | 21 struct BindSourceInfo; |
20 } | 22 } |
21 | 23 |
22 #endif | 24 #endif |
23 | 25 |
24 class ChromeContentGpuClient : public content::ContentGpuClient { | 26 class ChromeContentGpuClient : public content::ContentGpuClient { |
25 public: | 27 public: |
26 ChromeContentGpuClient(); | 28 ChromeContentGpuClient(); |
27 ~ChromeContentGpuClient() override; | 29 ~ChromeContentGpuClient() override; |
28 | 30 |
29 // content::ContentGpuClient: | 31 // content::ContentGpuClient: |
30 void Initialize(base::FieldTrialList::Observer* observer, | 32 void Initialize(base::FieldTrialList::Observer* observer, |
31 service_manager::BinderRegistry* registry) override; | 33 service_manager::BinderRegistry* registry) override; |
32 void GpuServiceInitialized( | 34 void GpuServiceInitialized( |
33 const gpu::GpuPreferences& gpu_preferences) override; | 35 const gpu::GpuPreferences& gpu_preferences) override; |
34 | 36 |
35 private: | 37 private: |
36 #if defined(OS_CHROMEOS) | 38 #if defined(OS_CHROMEOS) |
37 void CreateArcVideoDecodeAccelerator( | 39 void CreateArcVideoDecodeAccelerator( |
38 const service_manager::BindSourceInfo& source_info, | 40 const service_manager::BindSourceInfo& source_info, |
39 ::arc::mojom::VideoDecodeAcceleratorRequest request); | 41 ::arc::mojom::VideoDecodeAcceleratorRequest request); |
| 42 |
| 43 void CreateArcVideoEncodeAccelerator( |
| 44 const service_manager::BindSourceInfo& source_info, |
| 45 ::arc::mojom::VideoEncodeAcceleratorRequest request); |
40 #endif | 46 #endif |
41 | 47 |
42 std::unique_ptr<variations::ChildProcessFieldTrialSyncer> field_trial_syncer_; | 48 std::unique_ptr<variations::ChildProcessFieldTrialSyncer> field_trial_syncer_; |
43 // Used to profile process startup. | 49 // Used to profile process startup. |
44 base::StackSamplingProfiler stack_sampling_profiler_; | 50 base::StackSamplingProfiler stack_sampling_profiler_; |
45 | 51 |
46 #if defined(OS_CHROMEOS) | 52 #if defined(OS_CHROMEOS) |
47 gpu::GpuPreferences gpu_preferences_; | 53 gpu::GpuPreferences gpu_preferences_; |
48 #endif | 54 #endif |
49 | 55 |
50 DISALLOW_COPY_AND_ASSIGN(ChromeContentGpuClient); | 56 DISALLOW_COPY_AND_ASSIGN(ChromeContentGpuClient); |
51 }; | 57 }; |
52 | 58 |
53 #endif // CHROME_GPU_CHROME_CONTENT_GPU_CLIENT_H_ | 59 #endif // CHROME_GPU_CHROME_CONTENT_GPU_CLIENT_H_ |
OLD | NEW |