| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 WEBKIT_RENDERER_MEDIA_WEBMEDIAPLAYER_PARAMS_H_ | 5 #ifndef WEBKIT_RENDERER_MEDIA_WEBMEDIAPLAYER_PARAMS_H_ |
| 6 #define WEBKIT_RENDERER_MEDIA_WEBMEDIAPLAYER_PARAMS_H_ | 6 #define WEBKIT_RENDERER_MEDIA_WEBMEDIAPLAYER_PARAMS_H_ |
| 7 | 7 |
| 8 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
| 9 #include "media/filters/gpu_video_decoder.h" | 9 #include "media/filters/gpu_video_decoder.h" |
| 10 | 10 |
| 11 namespace base { |
| 12 class MessageLoopProxy; |
| 13 } |
| 14 |
| 11 namespace media { | 15 namespace media { |
| 12 class AudioRendererSink; | 16 class AudioRendererSink; |
| 13 class MediaLog; | 17 class MediaLog; |
| 14 } | 18 } |
| 15 | 19 |
| 16 namespace webkit_media { | 20 namespace webkit_media { |
| 17 | 21 |
| 18 // Holds parameters for constructing WebMediaPlayerImpl without having | 22 // Holds parameters for constructing WebMediaPlayerImpl without having |
| 19 // to plumb arguments through various abstraction layers. | 23 // to plumb arguments through various abstraction layers. |
| 20 class WebMediaPlayerParams { | 24 class WebMediaPlayerParams { |
| 21 public: | 25 public: |
| 22 // |media_log| is the only required parameter; all others may be null. | 26 // |message_loop_proxy| and |media_log| are the only required parameters; |
| 27 // all others may be null. |
| 23 WebMediaPlayerParams( | 28 WebMediaPlayerParams( |
| 29 const scoped_refptr<base::MessageLoopProxy>& message_loop_proxy, |
| 24 const scoped_refptr<media::AudioRendererSink>& audio_renderer_sink, | 30 const scoped_refptr<media::AudioRendererSink>& audio_renderer_sink, |
| 25 const scoped_refptr<media::GpuVideoDecoder::Factories>& gpu_factories, | 31 const scoped_refptr<media::GpuVideoDecoder::Factories>& gpu_factories, |
| 26 const scoped_refptr<media::MediaLog>& media_log); | 32 const scoped_refptr<media::MediaLog>& media_log); |
| 27 ~WebMediaPlayerParams(); | 33 ~WebMediaPlayerParams(); |
| 28 | 34 |
| 35 const scoped_refptr<base::MessageLoopProxy>& message_loop_proxy() const { |
| 36 return message_loop_proxy_; |
| 37 } |
| 38 |
| 29 const scoped_refptr<media::AudioRendererSink>& audio_renderer_sink() const { | 39 const scoped_refptr<media::AudioRendererSink>& audio_renderer_sink() const { |
| 30 return audio_renderer_sink_; | 40 return audio_renderer_sink_; |
| 31 } | 41 } |
| 32 | 42 |
| 33 const scoped_refptr<media::GpuVideoDecoder::Factories>& | 43 const scoped_refptr<media::GpuVideoDecoder::Factories>& |
| 34 gpu_factories() const { | 44 gpu_factories() const { |
| 35 return gpu_factories_; | 45 return gpu_factories_; |
| 36 } | 46 } |
| 37 | 47 |
| 38 const scoped_refptr<media::MediaLog>& media_log() const { | 48 const scoped_refptr<media::MediaLog>& media_log() const { |
| 39 return media_log_; | 49 return media_log_; |
| 40 } | 50 } |
| 41 | 51 |
| 42 private: | 52 private: |
| 53 scoped_refptr<base::MessageLoopProxy> message_loop_proxy_; |
| 43 scoped_refptr<media::AudioRendererSink> audio_renderer_sink_; | 54 scoped_refptr<media::AudioRendererSink> audio_renderer_sink_; |
| 44 scoped_refptr<media::GpuVideoDecoder::Factories> gpu_factories_; | 55 scoped_refptr<media::GpuVideoDecoder::Factories> gpu_factories_; |
| 45 scoped_refptr<media::MediaLog> media_log_; | 56 scoped_refptr<media::MediaLog> media_log_; |
| 46 | 57 |
| 47 DISALLOW_IMPLICIT_CONSTRUCTORS(WebMediaPlayerParams); | 58 DISALLOW_IMPLICIT_CONSTRUCTORS(WebMediaPlayerParams); |
| 48 }; | 59 }; |
| 49 | 60 |
| 50 } // namespace media | 61 } // namespace media |
| 51 | 62 |
| 52 #endif // WEBKIT_RENDERER_MEDIA_WEBMEDIAPLAYER_PARAMS_H_ | 63 #endif // WEBKIT_RENDERER_MEDIA_WEBMEDIAPLAYER_PARAMS_H_ |
| OLD | NEW |