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 CONTENT_TEST_TEST_MEDIA_STREAM_CLIENT_H_ | 5 #ifndef CONTENT_TEST_TEST_MEDIA_STREAM_RENDERER_FACTORY_H_ |
6 #define CONTENT_TEST_TEST_MEDIA_STREAM_CLIENT_H_ | 6 #define CONTENT_TEST_TEST_MEDIA_STREAM_RENDERER_FACTORY_H_ |
7 | 7 |
8 #include "base/callback_forward.h" | 8 #include "base/callback_forward.h" |
9 #include "content/public/renderer/render_frame_observer.h" | 9 #include "content/renderer/media/media_stream_renderer_factory.h" |
10 #include "content/renderer/media/media_stream_client.h" | |
11 #include "third_party/WebKit/public/platform/WebURL.h" | 10 #include "third_party/WebKit/public/platform/WebURL.h" |
12 | 11 |
13 namespace content { | 12 namespace content { |
14 | 13 |
15 // TestMediaStreamClient is a mock implementation of MediaStreamClient used when | 14 // TestMediaStreamClient is a mock implementation of MediaStreamClient used when |
16 // running layout tests. | 15 // running layout tests. |
17 class TestMediaStreamClient : public RenderFrameObserver, | 16 class TestMediaStreamRendererFactory : public MediaStreamRendererFactory { |
18 public MediaStreamClient { | |
19 public: | 17 public: |
20 explicit TestMediaStreamClient(RenderFrame* render_frame); | 18 TestMediaStreamRendererFactory(); |
21 virtual ~TestMediaStreamClient(); | 19 virtual ~TestMediaStreamRendererFactory(); |
22 | 20 |
23 // MediaStreamClient implementation. | 21 // MediaStreamRendererFactory implementation. |
24 virtual bool IsMediaStream(const GURL& url) OVERRIDE; | |
25 virtual scoped_refptr<VideoFrameProvider> GetVideoFrameProvider( | 22 virtual scoped_refptr<VideoFrameProvider> GetVideoFrameProvider( |
26 const GURL& url, | 23 const GURL& url, |
27 const base::Closure& error_cb, | 24 const base::Closure& error_cb, |
28 const VideoFrameProvider::RepaintCB& repaint_cb) OVERRIDE; | 25 const VideoFrameProvider::RepaintCB& repaint_cb) OVERRIDE; |
| 26 |
29 virtual scoped_refptr<MediaStreamAudioRenderer> GetAudioRenderer( | 27 virtual scoped_refptr<MediaStreamAudioRenderer> GetAudioRenderer( |
30 const GURL& url, int render_frame_id) OVERRIDE; | 28 const GURL& url, |
| 29 int render_view_id, |
| 30 int render_frame_id) OVERRIDE; |
31 }; | 31 }; |
32 | 32 |
33 } // namespace content | 33 } // namespace content |
34 | 34 |
35 #endif // CONTENT_TEST_TEST_MEDIA_STREAM_CLIENT_H_ | 35 #endif // CONTENT_TEST_TEST_MEDIA_STREAM_RENDERER_FACTORY_H_ |
OLD | NEW |