Index: content/common/android/surface_texture_manager.h |
diff --git a/content/common/android/surface_texture_manager.h b/content/common/android/surface_texture_manager.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..6d4e99c624b7743cf16510ad0916c3636ee8b61f |
--- /dev/null |
+++ b/content/common/android/surface_texture_manager.h |
@@ -0,0 +1,41 @@ |
+// Copyright 2014 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_ANDROID_SURFACE_TEXTURE_MANAGER_H_ |
+#define CONTENT_COMMON_ANDROID_SURFACE_TEXTURE_MANAGER_H_ |
+ |
+#include "ui/gfx/native_widget_types.h" |
+ |
+namespace gfx { |
+class SurfaceTexture; |
+} |
+ |
+namespace content { |
+ |
+class SurfaceTextureManager { |
no sievers
2014/10/06 22:28:27
Do you think this would fit better under content/c
reveman
2014/10/07 01:00:21
Maybe. I decided to keep these interfaces together
no sievers
2014/10/07 22:12:44
Yea no problem. I only mentioned it because it's s
reveman
2014/10/08 15:56:39
Correct, register/unregister are only used with in
|
+ public: |
+ static SurfaceTextureManager* GetInstance(); |
+ static void InitInstance(SurfaceTextureManager* instance); |
+ |
+ // Register a surface texture for use in another process. |
+ virtual void RegisterSurfaceTexture(int surface_texture_id, |
+ int client_id, |
+ gfx::SurfaceTexture* surface_texture) = 0; |
+ |
+ // Unregister a surface texture previously registered for use in another |
+ // process. |
+ virtual void UnregisterSurfaceTexture(int surface_texture_id, |
+ int client_id) = 0; |
+ |
+ // Acquire native widget for surface texture. |
+ virtual gfx::AcceleratedWidget AcquireNativeWidget(int surface_texture_id, |
+ int client_id) = 0; |
+ |
+ protected: |
+ virtual ~SurfaceTextureManager() {} |
+}; |
+ |
+} // namespace content |
+ |
+#endif // CONTENT_COMMON_ANDROID_SURFACE_TEXTURE_MANAGER_H_ |