Index: content/common/android/surface_texture_peer.h |
diff --git a/content/common/android/surface_texture_peer.h b/content/common/android/surface_texture_peer.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..0b079f05871ab4c088b6cdd12e110809f6919278 |
--- /dev/null |
+++ b/content/common/android/surface_texture_peer.h |
@@ -0,0 +1,45 @@ |
+// Copyright (c) 2012 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_PEER_H_ |
+#define CONTENT_COMMON_ANDROID_SURFACE_TEXTURE_PEER_H_ |
+ |
+#include <jni.h> |
+ |
+#include "base/process.h" |
+ |
+namespace content { |
+ |
+class SurfaceTexturePeer { |
+ public: |
+ enum SurfaceTextureTarget { |
+ // These are used in java so don't change them unless we can |
+ // share an enum from java and remove this enum. |
+ SET_GPU_SURFACE_TEXTURE = 0, // Contains gpu surface_texture_ and id |
+ SET_VIDEO_SURFACE_TEXTURE = 1, // contains video surface_texture_ and id |
+ }; |
+ |
+ static SurfaceTexturePeer* GetInstance(); |
+ |
+ static void InitInstance(SurfaceTexturePeer* instance); |
+ |
+ // Establish the producer end for the given surface texture in another |
+ // process. |
+ virtual void EstablishSurfaceTexturePeer(base::ProcessHandle pid, |
+ SurfaceTextureTarget type, |
+ jobject j_surface_texture, |
+ int primary_id, |
+ int secondary_id) = 0; |
+ |
+ protected: |
+ SurfaceTexturePeer(); |
+ virtual ~SurfaceTexturePeer(); |
+ |
+ private: |
+ DISALLOW_COPY_AND_ASSIGN(SurfaceTexturePeer); |
+}; |
+ |
+} // namespace content |
+ |
+#endif // CONTENT_COMMON_ANDROID_SURFACE_TEXTURE_PEER_H_ |