Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef UI_OZONE_GPU_GPU_PLATFORM_SUPPORT_H_ | |
| 6 #define UI_OZONE_GPU_GPU_PLATFORM_SUPPORT_H_ | |
| 7 | |
| 8 #include "ipc/ipc_listener.h" | |
| 9 #include "ipc/ipc_sender.h" | |
| 10 #include "ui/ozone/gpu/ozone_gpu_export.h" | |
| 11 | |
| 12 namespace ui { | |
| 13 | |
| 14 // Conduit for display-related messaging from browser to GPU (gpu end). | |
| 15 // | |
| 16 // See GpuPlatformSupportHost for more context. | |
| 17 class OZONE_GPU_EXPORT GpuPlatformSupport : public IPC::Listener { | |
| 18 public: | |
| 19 virtual ~GpuPlatformSupport() {} | |
| 20 | |
| 21 // Initialize the static instance. | |
| 22 static GpuPlatformSupport* Initialize(); | |
|
alexst (slow to review)
2014/06/16 21:34:23
Init returns the object here, so does GetInstance
| |
| 23 | |
| 24 // Get the static instance. | |
| 25 static GpuPlatformSupport* GetInstance(); | |
| 26 | |
| 27 // Called when the GPU process is spun up & channel established. | |
| 28 virtual void OnChannelEstablished(IPC::Sender* sender, int route_id) = 0; | |
| 29 | |
| 30 private: | |
| 31 static GpuPlatformSupport* instance_; | |
| 32 }; | |
| 33 | |
| 34 // Create a stub implementation. | |
| 35 OZONE_GPU_EXPORT GpuPlatformSupport* CreateStubGpuPlatformSupport(); | |
| 36 | |
| 37 } // namespace ui | |
| 38 | |
| 39 #endif // UI_OZONE_GPU_GPU_PLATFORM_SUPPORT_H_ | |
| OLD | NEW |