| 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 MEDIA_BLINK_WEBMEDIAPLAYER_PARAMS_H_ | 5 #ifndef MEDIA_BLINK_WEBMEDIAPLAYER_PARAMS_H_ |
| 6 #define MEDIA_BLINK_WEBMEDIAPLAYER_PARAMS_H_ | 6 #define MEDIA_BLINK_WEBMEDIAPLAYER_PARAMS_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 "media/base/media_export.h" | 10 #include "media/base/media_export.h" |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 class MediaLog; | 25 class MediaLog; |
| 26 | 26 |
| 27 // Holds parameters for constructing WebMediaPlayerImpl without having | 27 // Holds parameters for constructing WebMediaPlayerImpl without having |
| 28 // to plumb arguments through various abstraction layers. | 28 // to plumb arguments through various abstraction layers. |
| 29 class MEDIA_EXPORT WebMediaPlayerParams { | 29 class MEDIA_EXPORT WebMediaPlayerParams { |
| 30 public: | 30 public: |
| 31 // Callback used to create EncryptedMediaPlayerSupport instances. This | 31 // Callback used to create EncryptedMediaPlayerSupport instances. This |
| 32 // callback must always return a valid EncryptedMediaPlayerSupport object. | 32 // callback must always return a valid EncryptedMediaPlayerSupport object. |
| 33 typedef base::Callback<scoped_ptr<EncryptedMediaPlayerSupport>( | 33 typedef base::Callback<scoped_ptr<EncryptedMediaPlayerSupport>( |
| 34 blink::WebMediaPlayerClient*)> EncryptedMediaPlayerSupportCreateCB; | 34 blink::WebMediaPlayerClient*)> EncryptedMediaPlayerSupportCreateCB; |
| 35 typedef base::Callback<void(const base::Closure&)> DeferLoadCB; |
| 35 | 36 |
| 36 // |defer_load_cb|, |audio_renderer_sink|, and |compositor_task_runner| may be | 37 // |defer_load_cb|, |audio_renderer_sink|, and |compositor_task_runner| may be |
| 37 // null. | 38 // null. |
| 38 WebMediaPlayerParams( | 39 WebMediaPlayerParams( |
| 39 const base::Callback<void(const base::Closure&)>& defer_load_cb, | 40 const DeferLoadCB& defer_load_cb, |
| 40 const scoped_refptr<AudioRendererSink>& audio_renderer_sink, | 41 const scoped_refptr<AudioRendererSink>& audio_renderer_sink, |
| 41 const AudioHardwareConfig& audio_hardware_config, | 42 const AudioHardwareConfig& audio_hardware_config, |
| 42 const scoped_refptr<MediaLog>& media_log, | 43 const scoped_refptr<MediaLog>& media_log, |
| 43 const scoped_refptr<GpuVideoAcceleratorFactories>& gpu_factories, | 44 const scoped_refptr<GpuVideoAcceleratorFactories>& gpu_factories, |
| 44 const scoped_refptr<base::SingleThreadTaskRunner>& | 45 const scoped_refptr<base::SingleThreadTaskRunner>& |
| 45 media_task_runner, | 46 media_task_runner, |
| 46 const scoped_refptr<base::SingleThreadTaskRunner>& | 47 const scoped_refptr<base::SingleThreadTaskRunner>& |
| 47 compositor_task_runner, | 48 compositor_task_runner, |
| 48 const EncryptedMediaPlayerSupportCreateCB& | 49 const EncryptedMediaPlayerSupportCreateCB& |
| 49 encrypted_media_player_support_cb); | 50 encrypted_media_player_support_cb); |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 93 scoped_refptr<base::SingleThreadTaskRunner> media_task_runner_; | 94 scoped_refptr<base::SingleThreadTaskRunner> media_task_runner_; |
| 94 scoped_refptr<base::SingleThreadTaskRunner> compositor_task_runner_; | 95 scoped_refptr<base::SingleThreadTaskRunner> compositor_task_runner_; |
| 95 EncryptedMediaPlayerSupportCreateCB encrypted_media_player_support_cb_; | 96 EncryptedMediaPlayerSupportCreateCB encrypted_media_player_support_cb_; |
| 96 | 97 |
| 97 DISALLOW_IMPLICIT_CONSTRUCTORS(WebMediaPlayerParams); | 98 DISALLOW_IMPLICIT_CONSTRUCTORS(WebMediaPlayerParams); |
| 98 }; | 99 }; |
| 99 | 100 |
| 100 } // namespace media | 101 } // namespace media |
| 101 | 102 |
| 102 #endif // MEDIA_BLINK_WEBMEDIAPLAYER_PARAMS_H_ | 103 #endif // MEDIA_BLINK_WEBMEDIAPLAYER_PARAMS_H_ |
| OLD | NEW |