Index: gpu/ipc/common/android/scoped_surface_request_conduit.h |
diff --git a/gpu/ipc/common/android/scoped_surface_request_conduit.h b/gpu/ipc/common/android/scoped_surface_request_conduit.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..d5b33933742689e013e3e058950e92c77e82241a |
--- /dev/null |
+++ b/gpu/ipc/common/android/scoped_surface_request_conduit.h |
@@ -0,0 +1,39 @@ |
+// Copyright 2016 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 GPU_IPC_COMMON_ANDROID_SCOPED_SURFACE_REQUEST_CONDUIT_H_ |
+#define GPU_IPC_COMMON_ANDROID_SCOPED_SURFACE_REQUEST_CONDUIT_H_ |
+ |
+#include "gpu/gpu_export.h" |
+ |
+namespace base { |
+class UnguessableToken; |
+} |
+ |
+namespace gl { |
+class SurfaceTexture; |
+} |
+ |
+namespace gpu { |
+ |
+// Allows the forwarding of SurfaceTextures from the GPU or the browser process |
+// to fulfill requests registered by the ScopedSurfaceRequestManager. |
+class GPU_EXPORT ScopedSurfaceRequestConduit { |
+ public: |
+ static ScopedSurfaceRequestConduit* GetInstance(); |
+ static void SetInstance(ScopedSurfaceRequestConduit* instance); |
+ |
+ // Sends the surface texture to the ScopedSurfaceRequestManager in the browser |
+ // process, to fulfill the request registered under the |request_token| key. |
+ virtual void ForwardSurfaceTextureForSurfaceRequest( |
+ const base::UnguessableToken& request_token, |
+ const gl::SurfaceTexture* surface_texture) = 0; |
+ |
+ protected: |
+ virtual ~ScopedSurfaceRequestConduit() {} |
+}; |
+ |
+} // namespace gpu |
+ |
+#endif // GPU_IPC_COMMON_ANDROID_SCOPED_SURFACE_REQUEST_CONDUIT_H_ |