Home | History | Annotate | Download | only in media
      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.
      4 
      5 #ifndef CONTENT_RENDERER_MEDIA_WEBMEDIAPLAYER_PARAMS_H_
      6 #define CONTENT_RENDERER_MEDIA_WEBMEDIAPLAYER_PARAMS_H_
      7 
      8 #include "base/callback.h"
      9 #include "base/memory/ref_counted.h"
     10 
     11 namespace media {
     12 class AudioRendererSink;
     13 }
     14 
     15 namespace content {
     16 
     17 // Holds parameters for constructing WebMediaPlayerImpl without having
     18 // to plumb arguments through various abstraction layers.
     19 class WebMediaPlayerParams {
     20  public:
     21   // Parameters may be null.
     22   WebMediaPlayerParams(
     23       const base::Callback<void(const base::Closure&)>& defer_load_cb,
     24       const scoped_refptr<media::AudioRendererSink>& audio_renderer_sink);
     25   ~WebMediaPlayerParams();
     26 
     27   base::Callback<void(const base::Closure&)> defer_load_cb() const {
     28     return defer_load_cb_;
     29   }
     30 
     31   const scoped_refptr<media::AudioRendererSink>& audio_renderer_sink() const {
     32     return audio_renderer_sink_;
     33   }
     34 
     35  private:
     36   base::Callback<void(const base::Closure&)> defer_load_cb_;
     37   scoped_refptr<media::AudioRendererSink> audio_renderer_sink_;
     38 
     39   DISALLOW_IMPLICIT_CONSTRUCTORS(WebMediaPlayerParams);
     40 };
     41 
     42 }  // namespace media
     43 
     44 #endif  // CONTENT_RENDERER_MEDIA_WEBMEDIAPLAYER_PARAMS_H_
     45