OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CONTENT_RENDERER_MEDIA_ANDROID_STREAM_TEXTURE_FACTORY_SYNCHRONOUS_IMPL_H
_ | 5 #ifndef CONTENT_RENDERER_MEDIA_ANDROID_STREAM_TEXTURE_FACTORY_SYNCHRONOUS_IMPL_H
_ |
6 #define CONTENT_RENDERER_MEDIA_ANDROID_STREAM_TEXTURE_FACTORY_SYNCHRONOUS_IMPL_H
_ | 6 #define CONTENT_RENDERER_MEDIA_ANDROID_STREAM_TEXTURE_FACTORY_SYNCHRONOUS_IMPL_H
_ |
7 | 7 |
8 #include "base/callback.h" | 8 #include "base/callback.h" |
9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
10 #include "content/renderer/media/android/stream_texture_factory.h" | 10 #include "content/renderer/media/android/stream_texture_factory.h" |
(...skipping 23 matching lines...) Expand all Loading... |
34 protected: | 34 protected: |
35 friend class base::RefCountedThreadSafe<ContextProvider>; | 35 friend class base::RefCountedThreadSafe<ContextProvider>; |
36 virtual ~ContextProvider() {} | 36 virtual ~ContextProvider() {} |
37 }; | 37 }; |
38 | 38 |
39 typedef base::Callback<scoped_refptr<ContextProvider>(void)> | 39 typedef base::Callback<scoped_refptr<ContextProvider>(void)> |
40 CreateContextProviderCallback; | 40 CreateContextProviderCallback; |
41 | 41 |
42 static scoped_refptr<StreamTextureFactorySynchronousImpl> Create( | 42 static scoped_refptr<StreamTextureFactorySynchronousImpl> Create( |
43 const CreateContextProviderCallback& try_create_callback, | 43 const CreateContextProviderCallback& try_create_callback, |
44 int view_id); | 44 int frame_id); |
45 | 45 |
46 virtual StreamTextureProxy* CreateProxy() OVERRIDE; | 46 virtual StreamTextureProxy* CreateProxy() OVERRIDE; |
47 virtual void EstablishPeer(int32 stream_id, int player_id) OVERRIDE; | 47 virtual void EstablishPeer(int32 stream_id, int player_id) OVERRIDE; |
48 virtual unsigned CreateStreamTexture(unsigned texture_target, | 48 virtual unsigned CreateStreamTexture(unsigned texture_target, |
49 unsigned* texture_id, | 49 unsigned* texture_id, |
50 gpu::Mailbox* texture_mailbox) OVERRIDE; | 50 gpu::Mailbox* texture_mailbox) OVERRIDE; |
51 virtual void SetStreamTextureSize(int32 stream_id, | 51 virtual void SetStreamTextureSize(int32 stream_id, |
52 const gfx::Size& size) OVERRIDE; | 52 const gfx::Size& size) OVERRIDE; |
53 virtual gpu::gles2::GLES2Interface* ContextGL() OVERRIDE; | 53 virtual gpu::gles2::GLES2Interface* ContextGL() OVERRIDE; |
54 | 54 |
55 private: | 55 private: |
56 friend class base::RefCounted<StreamTextureFactorySynchronousImpl>; | 56 friend class base::RefCounted<StreamTextureFactorySynchronousImpl>; |
57 StreamTextureFactorySynchronousImpl( | 57 StreamTextureFactorySynchronousImpl( |
58 const CreateContextProviderCallback& try_create_callback, | 58 const CreateContextProviderCallback& try_create_callback, |
59 int view_id); | 59 int frame_id); |
60 virtual ~StreamTextureFactorySynchronousImpl(); | 60 virtual ~StreamTextureFactorySynchronousImpl(); |
61 | 61 |
62 CreateContextProviderCallback create_context_provider_callback_; | 62 CreateContextProviderCallback create_context_provider_callback_; |
63 scoped_refptr<ContextProvider> context_provider_; | 63 scoped_refptr<ContextProvider> context_provider_; |
64 int view_id_; | 64 int frame_id_; |
65 | 65 |
66 DISALLOW_IMPLICIT_CONSTRUCTORS(StreamTextureFactorySynchronousImpl); | 66 DISALLOW_IMPLICIT_CONSTRUCTORS(StreamTextureFactorySynchronousImpl); |
67 }; | 67 }; |
68 | 68 |
69 } // namespace content | 69 } // namespace content |
70 | 70 |
71 #endif // CONTENT_RENDERER_MEDIA_ANDROID_STREAM_TEXTURE_FACTORY_SYNCHRONOUS_IMP
L_H_ | 71 #endif // CONTENT_RENDERER_MEDIA_ANDROID_STREAM_TEXTURE_FACTORY_SYNCHRONOUS_IMP
L_H_ |
OLD | NEW |