Index: content/common/gpu/gpu_channel_manager_delegate.h |
diff --git a/content/common/gpu/gpu_channel_manager_delegate.h b/content/common/gpu/gpu_channel_manager_delegate.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..8ab1fd1196714647959bf36f37abaa86eb480edc |
--- /dev/null |
+++ b/content/common/gpu/gpu_channel_manager_delegate.h |
@@ -0,0 +1,43 @@ |
+// Copyright 2015 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef CONTENT_COMMON_GPU_GPU_CHANNEL_MANAGER_DELEGATE_H_ |
+#define CONTENT_COMMON_GPU_GPU_CHANNEL_MANAGER_DELEGATE_H_ |
+ |
+namespace content { |
+ |
+struct GPUMemoryUmaStats; |
+ |
+class GpuChannelManagerDelegate { |
+ public: |
+ virtual void AddSubscription(int32_t client_id, unsigned int target) = 0; |
+ |
+ virtual void CacheShader(int32_t client_id, |
no sievers
2016/02/19 00:19:24
nit: Maybe this could be StoreShaderToDisk() (you
Fady Samuel
2016/02/19 01:13:11
Done.
|
+ const std::string& key, |
+ const std::string& shader) = 0; |
+ // Response from GPU to an EstablishChannel request. |
+ virtual void ChannelEstablished(const IPC::ChannelHandle& channel_handle) = 0; |
+ |
+ // Notification from GPU that the channel is destroyed. |
+ virtual void DestroyChannel(int client_id) = 0; |
no sievers
2016/02/19 00:19:24
nit: how about DidDestroyChannel()?
Fady Samuel
2016/02/19 01:13:11
Done.
|
+ |
+ virtual void DidCreateOffscreenContext(const GURL& active_url) = 0; |
+ |
+ virtual void DidDestroyOffscreenContext(const GURL& active_url) = 0; |
+ |
+ virtual void DidLoseContext(bool offscreen, |
+ gpu::error::ContextLostReason reason, |
+ const GURL& active_url) = 0; |
+ |
+ virtual void GpuMemoryUmaStats(const GPUMemoryUmaStats& params) = 0; |
+ |
+ virtual void RemoveSubscription(int32_t client_id, unsigned int target) = 0; |
+ |
+ protected: |
+ virtual ~GpuChannelManagerDelegate() {} |
+}; |
+ |
+} // namespace content |
+ |
+#endif // CONTENT_COMMON_GPU_GPU_CHANNEL_MANAGER_DELEGATE_H_ |