1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef CONTENT_RENDERER_MEDIA_STREAM_TEXTURE_IMPL_ANDROID_H_
6 #define CONTENT_RENDERER_MEDIA_STREAM_TEXTURE_IMPL_ANDROID_H_
8 #include "base/memory/scoped_ptr.h"
9 #include "content/renderer/gpu/stream_texture_host_android.h"
10 #include "webkit/media/android/stream_texture_factory_android.h"
13 class WebGraphicsContext3D
;
19 // The acutal implementation of StreamTextureFactory class.
20 class StreamTextureFactoryImpl
21 : public webkit_media::StreamTextureFactory
{
23 StreamTextureFactoryImpl(WebKit::WebGraphicsContext3D
* context
,
24 GpuChannelHost
* channel
,
26 virtual ~StreamTextureFactoryImpl();
28 // webkit_media::StreamTextureFactory implementation:
29 virtual webkit_media::StreamTextureProxy
* CreateProxy() OVERRIDE
;
31 virtual void EstablishPeer(int stream_id
, int player_id
) OVERRIDE
;
33 virtual unsigned CreateStreamTexture(unsigned* texture_id
) OVERRIDE
;
34 virtual void DestroyStreamTexture(unsigned texture_id
) OVERRIDE
;
37 WebKit::WebGraphicsContext3D
* context_
;
38 scoped_refptr
<GpuChannelHost
> channel_
;
40 DISALLOW_COPY_AND_ASSIGN(StreamTextureFactoryImpl
);
43 } // namespace content
45 #endif // CONTENT_RENDERER_MEDIA_STREAM_TEXTURE_IMPL_ANDROID_H_