Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(149)

Side by Side Diff: content/renderer/media/android/stream_texture_factory.h

Issue 2136103010: Add StreamTextureWrapper/StreamTextureWrapperImpl (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Adding CONTENT_EXPORT to StreamTextureFactory Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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_H_ 5 #ifndef CONTENT_RENDERER_MEDIA_ANDROID_STREAM_TEXTURE_FACTORY_H_
6 #define CONTENT_RENDERER_MEDIA_ANDROID_STREAM_TEXTURE_FACTORY_H_ 6 #define CONTENT_RENDERER_MEDIA_ANDROID_STREAM_TEXTURE_FACTORY_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
11 11
12 #include "base/macros.h" 12 #include "base/macros.h"
13 #include "base/memory/ref_counted.h" 13 #include "base/memory/ref_counted.h"
14 #include "base/single_thread_task_runner.h" 14 #include "base/single_thread_task_runner.h"
15 #include "cc/layers/video_frame_provider.h" 15 #include "cc/layers/video_frame_provider.h"
16 #include "content/common/content_export.h"
16 #include "content/renderer/gpu/stream_texture_host_android.h" 17 #include "content/renderer/gpu/stream_texture_host_android.h"
17 #include "gpu/command_buffer/common/mailbox.h" 18 #include "gpu/command_buffer/common/mailbox.h"
18 #include "ui/gfx/geometry/size.h" 19 #include "ui/gfx/geometry/size.h"
19 20
20 namespace gpu { 21 namespace gpu {
21 namespace gles2 { 22 namespace gles2 {
22 class GLES2Interface; 23 class GLES2Interface;
23 } // namespace gles2 24 } // namespace gles2
24 class GpuChannelHost; 25 class GpuChannelHost;
25 } // namespace gpu 26 } // namespace gpu
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 cc::VideoFrameProvider::Client* client_; 63 cc::VideoFrameProvider::Client* client_;
63 scoped_refptr<base::SingleThreadTaskRunner> loop_; 64 scoped_refptr<base::SingleThreadTaskRunner> loop_;
64 65
65 DISALLOW_IMPLICIT_CONSTRUCTORS(StreamTextureProxy); 66 DISALLOW_IMPLICIT_CONSTRUCTORS(StreamTextureProxy);
66 }; 67 };
67 68
68 typedef std::unique_ptr<StreamTextureProxy, StreamTextureProxy::Deleter> 69 typedef std::unique_ptr<StreamTextureProxy, StreamTextureProxy::Deleter>
69 ScopedStreamTextureProxy; 70 ScopedStreamTextureProxy;
70 71
71 // Factory class for managing stream textures. 72 // Factory class for managing stream textures.
72 class StreamTextureFactory : public base::RefCounted<StreamTextureFactory> { 73 class CONTENT_EXPORT StreamTextureFactory
74 : public base::RefCounted<StreamTextureFactory> {
73 public: 75 public:
74 static scoped_refptr<StreamTextureFactory> Create( 76 static scoped_refptr<StreamTextureFactory> Create(
75 scoped_refptr<ContextProviderCommandBuffer> context_provider); 77 scoped_refptr<ContextProviderCommandBuffer> context_provider);
76 78
77 // Create the StreamTextureProxy object. 79 // Create the StreamTextureProxy object.
78 StreamTextureProxy* CreateProxy(); 80 StreamTextureProxy* CreateProxy();
79 81
80 // Send an IPC message to the browser process to request a java surface 82 // Send an IPC message to the browser process to request a java surface
81 // object for the given stream_id. After the the surface is created, 83 // object for the given stream_id. After the the surface is created,
82 // it will be passed back to the WebMediaPlayerAndroid object identified by 84 // it will be passed back to the WebMediaPlayerAndroid object identified by
(...skipping 20 matching lines...) Expand all
103 105
104 scoped_refptr<ContextProviderCommandBuffer> context_provider_; 106 scoped_refptr<ContextProviderCommandBuffer> context_provider_;
105 scoped_refptr<gpu::GpuChannelHost> channel_; 107 scoped_refptr<gpu::GpuChannelHost> channel_;
106 108
107 DISALLOW_IMPLICIT_CONSTRUCTORS(StreamTextureFactory); 109 DISALLOW_IMPLICIT_CONSTRUCTORS(StreamTextureFactory);
108 }; 110 };
109 111
110 } // namespace content 112 } // namespace content
111 113
112 #endif // CONTENT_RENDERER_MEDIA_ANDROID_STREAM_TEXTURE_FACTORY_H_ 114 #endif // CONTENT_RENDERER_MEDIA_ANDROID_STREAM_TEXTURE_FACTORY_H_
OLDNEW
« no previous file with comments | « content/content_tests.gypi ('k') | content/renderer/media/android/stream_texture_wrapper_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698