| 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 <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| 11 #include "base/macros.h" | 11 #include "base/macros.h" |
| 12 #include "base/memory/ref_counted.h" | 12 #include "base/memory/ref_counted.h" |
| 13 #include "media/blink/media_blink_export.h" | 13 #include "media/blink/media_blink_export.h" |
| 14 #include "media/filters/context_3d.h" | 14 #include "media/filters/context_3d.h" |
| 15 | 15 |
| 16 namespace base { | 16 namespace base { |
| 17 class SingleThreadTaskRunner; | 17 class SingleThreadTaskRunner; |
| 18 class TaskRunner; | 18 class TaskRunner; |
| 19 } | 19 } |
| 20 | 20 |
| 21 namespace blink { | 21 namespace blink { |
| 22 class WebContentDecryptionModule; | 22 class WebContentDecryptionModule; |
| 23 class WebMediaPlayerClient; | 23 class WebMediaPlayerClient; |
| 24 class WebMediaSession; |
| 24 } | 25 } |
| 25 | 26 |
| 26 namespace media { | 27 namespace media { |
| 27 | 28 |
| 28 class RestartableAudioRendererSink; | 29 class RestartableAudioRendererSink; |
| 29 class MediaLog; | 30 class MediaLog; |
| 30 class MediaPermission; | 31 class MediaPermission; |
| 31 | 32 |
| 32 // Holds parameters for constructing WebMediaPlayerImpl without having | 33 // Holds parameters for constructing WebMediaPlayerImpl without having |
| 33 // to plumb arguments through various abstraction layers. | 34 // to plumb arguments through various abstraction layers. |
| (...skipping 14 matching lines...) Expand all Loading... |
| 48 WebMediaPlayerParams( | 49 WebMediaPlayerParams( |
| 49 const DeferLoadCB& defer_load_cb, | 50 const DeferLoadCB& defer_load_cb, |
| 50 const scoped_refptr<RestartableAudioRendererSink>& audio_renderer_sink, | 51 const scoped_refptr<RestartableAudioRendererSink>& audio_renderer_sink, |
| 51 const scoped_refptr<MediaLog>& media_log, | 52 const scoped_refptr<MediaLog>& media_log, |
| 52 const scoped_refptr<base::SingleThreadTaskRunner>& media_task_runner, | 53 const scoped_refptr<base::SingleThreadTaskRunner>& media_task_runner, |
| 53 const scoped_refptr<base::TaskRunner>& worker_task_runner, | 54 const scoped_refptr<base::TaskRunner>& worker_task_runner, |
| 54 const scoped_refptr<base::SingleThreadTaskRunner>& compositor_task_runner, | 55 const scoped_refptr<base::SingleThreadTaskRunner>& compositor_task_runner, |
| 55 const Context3DCB& context_3d, | 56 const Context3DCB& context_3d, |
| 56 const AdjustAllocatedMemoryCB& adjust_allocated_memory_cb, | 57 const AdjustAllocatedMemoryCB& adjust_allocated_memory_cb, |
| 57 MediaPermission* media_permission, | 58 MediaPermission* media_permission, |
| 58 blink::WebContentDecryptionModule* initial_cdm); | 59 blink::WebContentDecryptionModule* initial_cdm, |
| 60 blink::WebMediaSession* session); |
| 59 | 61 |
| 60 ~WebMediaPlayerParams(); | 62 ~WebMediaPlayerParams(); |
| 61 | 63 |
| 62 DeferLoadCB defer_load_cb() const { return defer_load_cb_; } | 64 DeferLoadCB defer_load_cb() const { return defer_load_cb_; } |
| 63 | 65 |
| 64 const scoped_refptr<RestartableAudioRendererSink>& audio_renderer_sink() | 66 const scoped_refptr<RestartableAudioRendererSink>& audio_renderer_sink() |
| 65 const { | 67 const { |
| 66 return audio_renderer_sink_; | 68 return audio_renderer_sink_; |
| 67 } | 69 } |
| 68 | 70 |
| (...skipping 19 matching lines...) Expand all Loading... |
| 88 MediaPermission* media_permission() const { return media_permission_; } | 90 MediaPermission* media_permission() const { return media_permission_; } |
| 89 | 91 |
| 90 blink::WebContentDecryptionModule* initial_cdm() const { | 92 blink::WebContentDecryptionModule* initial_cdm() const { |
| 91 return initial_cdm_; | 93 return initial_cdm_; |
| 92 } | 94 } |
| 93 | 95 |
| 94 AdjustAllocatedMemoryCB adjust_allocated_memory_cb() const { | 96 AdjustAllocatedMemoryCB adjust_allocated_memory_cb() const { |
| 95 return adjust_allocated_memory_cb_; | 97 return adjust_allocated_memory_cb_; |
| 96 } | 98 } |
| 97 | 99 |
| 100 blink::WebMediaSession* session() const { return session_; } |
| 101 |
| 98 private: | 102 private: |
| 99 DeferLoadCB defer_load_cb_; | 103 DeferLoadCB defer_load_cb_; |
| 100 scoped_refptr<RestartableAudioRendererSink> audio_renderer_sink_; | 104 scoped_refptr<RestartableAudioRendererSink> audio_renderer_sink_; |
| 101 scoped_refptr<MediaLog> media_log_; | 105 scoped_refptr<MediaLog> media_log_; |
| 102 scoped_refptr<base::SingleThreadTaskRunner> media_task_runner_; | 106 scoped_refptr<base::SingleThreadTaskRunner> media_task_runner_; |
| 103 scoped_refptr<base::TaskRunner> worker_task_runner_; | 107 scoped_refptr<base::TaskRunner> worker_task_runner_; |
| 104 scoped_refptr<base::SingleThreadTaskRunner> compositor_task_runner_; | 108 scoped_refptr<base::SingleThreadTaskRunner> compositor_task_runner_; |
| 105 Context3DCB context_3d_cb_; | 109 Context3DCB context_3d_cb_; |
| 106 AdjustAllocatedMemoryCB adjust_allocated_memory_cb_; | 110 AdjustAllocatedMemoryCB adjust_allocated_memory_cb_; |
| 107 | 111 |
| 108 // TODO(xhwang): Remove after prefixed EME API support is removed. | 112 // TODO(xhwang): Remove after prefixed EME API support is removed. |
| 109 MediaPermission* media_permission_; | 113 MediaPermission* media_permission_; |
| 110 blink::WebContentDecryptionModule* initial_cdm_; | 114 blink::WebContentDecryptionModule* initial_cdm_; |
| 111 | 115 |
| 116 blink::WebMediaSession* session_; |
| 117 |
| 112 DISALLOW_IMPLICIT_CONSTRUCTORS(WebMediaPlayerParams); | 118 DISALLOW_IMPLICIT_CONSTRUCTORS(WebMediaPlayerParams); |
| 113 }; | 119 }; |
| 114 | 120 |
| 115 } // namespace media | 121 } // namespace media |
| 116 | 122 |
| 117 #endif // MEDIA_BLINK_WEBMEDIAPLAYER_PARAMS_H_ | 123 #endif // MEDIA_BLINK_WEBMEDIAPLAYER_PARAMS_H_ |
| OLD | NEW |