Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2052)

Unified Diff: webkit/media/webmediaplayer_params.h

Issue 11468033: Vanquish the remnants of media::MessageLoopFactory. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: constref Created 8 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: webkit/media/webmediaplayer_params.h
diff --git a/webkit/media/webmediaplayer_params.h b/webkit/media/webmediaplayer_params.h
new file mode 100644
index 0000000000000000000000000000000000000000..d78f78fd5420fd2c0cd3e5c504e428467edfff84
--- /dev/null
+++ b/webkit/media/webmediaplayer_params.h
@@ -0,0 +1,77 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef WEBKIT_MEDIA_WEBMEDIAPLAYER_PARAMS_H_
+#define WEBKIT_MEDIA_WEBMEDIAPLAYER_PARAMS_H_
+
+#include "base/memory/ref_counted.h"
+#include "media/filters/gpu_video_decoder.h"
+
+namespace media {
+class AudioRendererSink;
+class MediaLog;
+}
+
+namespace WebKit {
+class WebAudioSourceProvider;
+}
+
+namespace webkit_media {
+
+class MediaStreamClient;
+
+// Holds parameters for constructing WebMediaPlayerImpl without having
+// to plumb arguments through various abstraction layers.
+class WebMediaPlayerParams {
+ public:
+ // |media_log| is the only required parameter; all others may be null.
+ //
+ // If provided, |audio_source_provider| and |audio_renderer_sink| arguments
+ // must be the same object.
+ //
+ // TODO(scherkus): Remove WebAudioSourceProvider parameter once we
+ // refactor RenderAudioSourceProvider to live under webkit/media/
+ // instead of content/renderer/, see http://crbug.com/136442
+ WebMediaPlayerParams(
+ WebKit::WebAudioSourceProvider* audio_source_provider,
+ const scoped_refptr<media::AudioRendererSink>& audio_renderer_sink,
+ const scoped_refptr<media::GpuVideoDecoder::Factories>& gpu_factories,
+ MediaStreamClient* media_stream_client,
+ const scoped_refptr<media::MediaLog>& media_log);
+ ~WebMediaPlayerParams();
+
+ WebKit::WebAudioSourceProvider* audio_source_provider() const {
+ return audio_source_provider_;
+ }
+
+ const scoped_refptr<media::AudioRendererSink>& audio_renderer_sink() const {
+ return audio_renderer_sink_;
+ }
+
+ const scoped_refptr<media::GpuVideoDecoder::Factories>&
+ gpu_factories() const {
+ return gpu_factories_;
+ }
+
+ MediaStreamClient* media_stream_client() const {
+ return media_stream_client_;
+ }
+
+ const scoped_refptr<media::MediaLog>& media_log() const {
+ return media_log_;
+ }
+
+ private:
+ WebKit::WebAudioSourceProvider* audio_source_provider_;
+ scoped_refptr<media::AudioRendererSink> audio_renderer_sink_;
+ scoped_refptr<media::GpuVideoDecoder::Factories> gpu_factories_;
+ MediaStreamClient* media_stream_client_;
+ scoped_refptr<media::MediaLog> media_log_;
+
+ DISALLOW_IMPLICIT_CONSTRUCTORS(WebMediaPlayerParams);
+};
+
+} // namespace media
+
+#endif // WEBKIT_MEDIA_WEBMEDIAPLAYER_PARAMS_H_

Powered by Google App Engine
This is Rietveld 408576698