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_PUBLIC_GPU_CONTENT_GPU_CLIENT_H_ | 5 #ifndef CONTENT_PUBLIC_GPU_CONTENT_GPU_CLIENT_H_ |
6 #define CONTENT_PUBLIC_GPU_CONTENT_GPU_CLIENT_H_ | 6 #define CONTENT_PUBLIC_GPU_CONTENT_GPU_CLIENT_H_ |
7 | 7 |
8 #include "base/metrics/field_trial.h" | 8 #include "base/metrics/field_trial.h" |
9 #include "content/public/common/content_client.h" | 9 #include "content/public/common/content_client.h" |
10 | 10 |
11 namespace gpu { | 11 namespace gpu { |
12 class SyncPointManager; | 12 class SyncPointManager; |
13 } | 13 } |
14 | 14 |
| 15 namespace shell { |
| 16 class InterfaceRegistry; |
| 17 } |
| 18 |
15 namespace content { | 19 namespace content { |
16 | 20 |
17 class ServiceRegistry; | |
18 | |
19 // Embedder API for participating in gpu logic. | 21 // Embedder API for participating in gpu logic. |
20 class CONTENT_EXPORT ContentGpuClient { | 22 class CONTENT_EXPORT ContentGpuClient { |
21 public: | 23 public: |
22 virtual ~ContentGpuClient() {} | 24 virtual ~ContentGpuClient() {} |
23 | 25 |
24 // Initializes the client. This sets up the field trial synchronization | 26 // Initializes the client. This sets up the field trial synchronization |
25 // mechanism, which will notify |observer| when a field trial is activated, | 27 // mechanism, which will notify |observer| when a field trial is activated, |
26 // which should be used to inform the browser process of this state. | 28 // which should be used to inform the browser process of this state. |
27 virtual void Initialize(base::FieldTrialList::Observer* observer) {} | 29 virtual void Initialize(base::FieldTrialList::Observer* observer) {} |
28 | 30 |
29 // Allows client to register Mojo services in |registry| on the GPU process. | 31 // Allows client to register Mojo interfaces in |registry| on the GPU process. |
30 // The registered services will be exposed to the browser process through | 32 // The registered interfaces will be exposed to the browser process through |
31 // GpuProcessHost. | 33 // GpuProcessHost. |
32 virtual void RegisterMojoServices(ServiceRegistry* registry) {} | 34 virtual void RegisterMojoInterfaces(shell::InterfaceRegistry* registry) {} |
33 | 35 |
34 // Allows client to supply a SyncPointManager instance instead of having | 36 // Allows client to supply a SyncPointManager instance instead of having |
35 // content internally create one. | 37 // content internally create one. |
36 virtual gpu::SyncPointManager* GetSyncPointManager(); | 38 virtual gpu::SyncPointManager* GetSyncPointManager(); |
37 }; | 39 }; |
38 | 40 |
39 } // namespace content | 41 } // namespace content |
40 | 42 |
41 #endif // CONTENT_PUBLIC_GPU_CONTENT_GPU_CLIENT_H_ | 43 #endif // CONTENT_PUBLIC_GPU_CONTENT_GPU_CLIENT_H_ |
OLD | NEW |