OLD | NEW |
---|---|
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 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 UI_OZONE_PUBLIC_GPU_PLATFORM_SUPPORT_H_ | 5 #ifndef UI_OZONE_PUBLIC_GPU_PLATFORM_SUPPORT_H_ |
6 #define UI_OZONE_PUBLIC_GPU_PLATFORM_SUPPORT_H_ | 6 #define UI_OZONE_PUBLIC_GPU_PLATFORM_SUPPORT_H_ |
7 | 7 |
8 #include "base/callback.h" | |
8 #include "ipc/ipc_listener.h" | 9 #include "ipc/ipc_listener.h" |
9 #include "ipc/ipc_sender.h" | 10 #include "ipc/ipc_sender.h" |
10 #include "ui/ozone/ozone_base_export.h" | 11 #include "ui/ozone/ozone_base_export.h" |
11 | 12 |
12 namespace ui { | 13 namespace ui { |
13 | 14 |
14 // Platform-specific object to support a GPU process. | 15 // Platform-specific object to support a GPU process. |
15 // | 16 // |
16 // See GpuPlatformSupportHost for more context. | 17 // See GpuPlatformSupportHost for more context. |
17 class OZONE_BASE_EXPORT GpuPlatformSupport : public IPC::Listener { | 18 class OZONE_BASE_EXPORT GpuPlatformSupport : public IPC::Listener { |
18 public: | 19 public: |
19 GpuPlatformSupport(); | 20 GpuPlatformSupport(); |
20 ~GpuPlatformSupport() override; | 21 ~GpuPlatformSupport() override; |
21 | 22 |
22 // Called when the GPU process is spun up & channel established. | 23 // Called when the GPU process is spun up & channel established. |
23 virtual void OnChannelEstablished(IPC::Sender* sender) = 0; | 24 virtual void OnChannelEstablished(IPC::Sender* sender) = 0; |
25 | |
26 virtual void RelinquishGpuResources(const base::Closure& callback); | |
spang
2014/11/20 18:08:22
Er, one last nit:
can you leave this as a pure in
GusFernandez
2014/11/20 21:42:48
I also had to implement a stub implementation for
| |
24 }; | 27 }; |
25 | 28 |
26 // Create a stub implementation. | 29 // Create a stub implementation. |
27 OZONE_BASE_EXPORT GpuPlatformSupport* CreateStubGpuPlatformSupport(); | 30 OZONE_BASE_EXPORT GpuPlatformSupport* CreateStubGpuPlatformSupport(); |
28 | 31 |
29 } // namespace ui | 32 } // namespace ui |
30 | 33 |
31 #endif // UI_OZONE_PUBLIC_GPU_PLATFORM_SUPPORT_H_ | 34 #endif // UI_OZONE_PUBLIC_GPU_PLATFORM_SUPPORT_H_ |
OLD | NEW |