Index: media/gpu/ipc/service/gpu_jpeg_decode_accelerator.h |
diff --git a/media/gpu/ipc/service/gpu_jpeg_decode_accelerator.h b/media/gpu/ipc/service/gpu_jpeg_decode_accelerator.h |
index d2459be358b222a2a243900d30ac58056a1e8b26..811ad6ec6ad12a51bf118ad72334d10c84767a82 100644 |
--- a/media/gpu/ipc/service/gpu_jpeg_decode_accelerator.h |
+++ b/media/gpu/ipc/service/gpu_jpeg_decode_accelerator.h |
@@ -16,6 +16,7 @@ |
#include "base/synchronization/waitable_event.h" |
#include "ipc/ipc_listener.h" |
#include "ipc/ipc_sender.h" |
+#include "media/gpu/mojo/jpeg_decoder.mojom.h" |
#include "media/video/jpeg_decode_accelerator.h" |
namespace base { |
@@ -41,8 +42,11 @@ class GpuJpegDecodeAcceleratorFactoryProvider { |
static std::vector<CreateAcceleratorCB> GetAcceleratorFactories(); |
}; |
+// TODO(c.padhi): Move GpuJpegDecodeAccelerator to media/gpu/mojo, see |
+// http://crbug.com/699255. |
class GpuJpegDecodeAccelerator |
: public IPC::Sender, |
+ public mojom::GpuJpegDecodeAccelerator, |
public base::SupportsWeakPtr<GpuJpegDecodeAccelerator> { |
public: |
// |channel| must outlive this object. |
@@ -67,6 +71,15 @@ class GpuJpegDecodeAccelerator |
int32_t bitstream_buffer_id, |
JpegDecodeAccelerator::Error error); |
+ // mojom::GpuJpegDecodeAccelerator implementation. |
+ void Initialize(InitializeCallback callback) override; |
+ void Decode(mojom::BitstreamBufferPtr input_buffer, |
+ const gfx::Size& coded_size, |
+ mojo::ScopedSharedBufferHandle output_handle, |
+ uint32_t output_buffer_size, |
+ DecodeCallback callback) override; |
+ void Uninitialize() override; |
+ |
// Function to delegate sending to actual sender. |
bool Send(IPC::Message* message) override; |