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