OLD | NEW |
---|---|
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 CONTENT_RENDERER_MEDIA_MEDIA_STREAM_CLIENT_H_ | 5 #ifndef CONTENT_RENDERER_MEDIA_MEDIA_STREAM_RENDERER_FACTORY_H_ |
6 #define CONTENT_RENDERER_MEDIA_MEDIA_STREAM_CLIENT_H_ | 6 #define CONTENT_RENDERER_MEDIA_MEDIA_STREAM_RENDERER_FACTORY_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 "content/common/content_export.h" | |
11 #include "content/renderer/media/media_stream_audio_renderer.h" | |
10 #include "content/renderer/media/video_frame_provider.h" | 12 #include "content/renderer/media/video_frame_provider.h" |
11 | 13 #include "url/gurl.h" |
12 class GURL; | |
13 | 14 |
14 namespace content { | 15 namespace content { |
15 | 16 |
16 class MediaStreamAudioRenderer; | 17 // MediaStreamRendererFactory is used by WebMediaPlayerMS to create audio and |
17 | 18 // video feeds from a MediaStream provided an URL. |
18 // Define an interface for media stream client to get some information about | 19 // The factory methods are virtual in order for blink layouttests to be able to |
19 // the media stream. | 20 // override them. |
20 class MediaStreamClient { | 21 class CONTENT_EXPORT MediaStreamRendererFactory { |
21 public: | 22 public: |
22 // Check if the |url| is derived from a media stream object. | 23 MediaStreamRendererFactory(); |
23 virtual bool IsMediaStream(const GURL& url) = 0; | 24 virtual ~MediaStreamRendererFactory(); |
24 | 25 |
25 virtual scoped_refptr<VideoFrameProvider> GetVideoFrameProvider( | 26 virtual scoped_refptr<VideoFrameProvider> GetVideoFrameProvider( |
26 const GURL& url, | 27 const GURL& url, |
27 const base::Closure& error_cb, | 28 const base::Closure& error_cb, |
28 const VideoFrameProvider::RepaintCB& repaint_cb) = 0; | 29 const VideoFrameProvider::RepaintCB& repaint_cb); |
29 | 30 |
30 virtual scoped_refptr<MediaStreamAudioRenderer> GetAudioRenderer( | 31 virtual scoped_refptr<MediaStreamAudioRenderer> GetAudioRenderer( |
31 const GURL& url, int render_frame_id) = 0; | 32 const GURL& url, |
33 int render_view_id, | |
34 int render_frame_id); | |
32 | 35 |
33 protected: | 36 private: |
34 virtual ~MediaStreamClient() {} | 37 DISALLOW_COPY_AND_ASSIGN(MediaStreamRendererFactory); |
35 }; | 38 }; |
36 | 39 |
37 } // namespace content | 40 } // namespace content |
no longer working on chromium
2014/05/27 12:30:36
nit, add an empty line
perkj_chrome
2014/05/27 13:27:03
Done.
| |
38 | 41 #endif // CONTENT_RENDERER_MEDIA_MEDIA_STREAM_RENDERER_FACTORY_H_ |
39 #endif // CONTENT_RENDERER_MEDIA_MEDIA_STREAM_CLIENT_H_ | |
OLD | NEW |