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 struct GpuPreferences; | 13 struct GpuPreferences; |
14 } | 14 } |
15 | 15 |
16 namespace service_manager { | 16 namespace service_manager { |
17 class InterfaceProvider; | 17 class Connector; |
18 class InterfaceRegistry; | 18 class InterfaceRegistry; |
19 } | 19 } |
20 | 20 |
21 namespace content { | 21 namespace content { |
22 | 22 |
23 // Embedder API for participating in gpu logic. | 23 // Embedder API for participating in gpu logic. |
24 class CONTENT_EXPORT ContentGpuClient { | 24 class CONTENT_EXPORT ContentGpuClient { |
25 public: | 25 public: |
26 virtual ~ContentGpuClient() {} | 26 virtual ~ContentGpuClient() {} |
27 | 27 |
28 // Initializes the client. This sets up the field trial synchronization | 28 // Initializes the client. This sets up the field trial synchronization |
29 // mechanism, which will notify |observer| when a field trial is activated, | 29 // mechanism, which will notify |observer| when a field trial is activated, |
30 // which should be used to inform the browser process of this state. | 30 // which should be used to inform the browser process of this state. |
31 virtual void Initialize(base::FieldTrialList::Observer* observer) {} | 31 virtual void Initialize(base::FieldTrialList::Observer* observer) {} |
32 | 32 |
33 // Allows the client to expose interfaces from the GPU process to the browser | 33 // Allows the client to expose interfaces from the GPU process to the browser |
34 // process via |registry|. | 34 // process via |registry|. |
35 virtual void ExposeInterfacesToBrowser( | 35 virtual void ExposeInterfacesToBrowser( |
36 service_manager::InterfaceRegistry* registry, | 36 service_manager::InterfaceRegistry* registry, |
37 const gpu::GpuPreferences& gpu_preferences) {} | 37 const gpu::GpuPreferences& gpu_preferences) {} |
38 | 38 |
39 // Allow the client to bind interfaces exposed by the browser process. | 39 // Allow the client to bind interfaces exposed by the browser process. |
40 virtual void ConsumeInterfacesFromBrowser( | 40 virtual void ConsumeInterfacesFromBrowser( |
41 service_manager::InterfaceProvider* provider) {} | 41 service_manager::Connector* connector) {} |
42 | 42 |
43 // Allows client to supply a SyncPointManager instance instead of having | 43 // Allows client to supply a SyncPointManager instance instead of having |
44 // content internally create one. | 44 // content internally create one. |
45 virtual gpu::SyncPointManager* GetSyncPointManager(); | 45 virtual gpu::SyncPointManager* GetSyncPointManager(); |
46 }; | 46 }; |
47 | 47 |
48 } // namespace content | 48 } // namespace content |
49 | 49 |
50 #endif // CONTENT_PUBLIC_GPU_CONTENT_GPU_CLIENT_H_ | 50 #endif // CONTENT_PUBLIC_GPU_CONTENT_GPU_CLIENT_H_ |
OLD | NEW |