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
3 // found in the LICENSE file.
5 #ifndef CONTENT_RENDERER_MEDIA_WEBMEDIAPLAYER_PARAMS_H_
6 #define CONTENT_RENDERER_MEDIA_WEBMEDIAPLAYER_PARAMS_H_
8 #include "base/callback.h"
9 #include "base/memory/ref_counted.h"
12 class AudioRendererSink
;
17 // Holds parameters for constructing WebMediaPlayerImpl without having
18 // to plumb arguments through various abstraction layers.
19 class WebMediaPlayerParams
{
21 // Parameters may be null.
23 const base::Callback
<void(const base::Closure
&)>& defer_load_cb
,
24 const scoped_refptr
<media::AudioRendererSink
>& audio_renderer_sink
);
25 ~WebMediaPlayerParams();
27 base::Callback
<void(const base::Closure
&)> defer_load_cb() const {
28 return defer_load_cb_
;
31 const scoped_refptr
<media::AudioRendererSink
>& audio_renderer_sink() const {
32 return audio_renderer_sink_
;
36 base::Callback
<void(const base::Closure
&)> defer_load_cb_
;
37 scoped_refptr
<media::AudioRendererSink
> audio_renderer_sink_
;
39 DISALLOW_IMPLICIT_CONSTRUCTORS(WebMediaPlayerParams
);
42 } // namespace content
44 #endif // CONTENT_RENDERER_MEDIA_WEBMEDIAPLAYER_PARAMS_H_