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