| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 // TestMediaStreamClient is an implementation of webkit_media::MediaStreamClient | 5 // TestMediaStreamClient is an implementation of webkit_media::MediaStreamClient |
| 6 // and used with WebKit::WebUserMediaClientMock to provide corresponding video | 6 // and used with WebKit::WebUserMediaClientMock to provide corresponding video |
| 7 // decoder to media pipeline. | 7 // decoder to media pipeline. |
| 8 | 8 |
| 9 // TODO(wjia): remove this class once | 9 // TODO(wjia): remove this class once |
| 10 // https://bugs.webkit.org/show_bug.cgi?id=113633 is fixed, since it has been | 10 // https://bugs.webkit.org/show_bug.cgi?id=113633 is fixed, since it has been |
| 11 // moved into webkit/mocks. | 11 // moved into webkit/mocks. |
| 12 | 12 |
| 13 #ifndef WEBKIT_SUPPORT_TEST_MEDIA_STREAM_CLIENT_H_ | 13 #ifndef WEBKIT_SUPPORT_TEST_MEDIA_STREAM_CLIENT_H_ |
| 14 #define WEBKIT_SUPPORT_TEST_MEDIA_STREAM_CLIENT_H_ | 14 #define WEBKIT_SUPPORT_TEST_MEDIA_STREAM_CLIENT_H_ |
| 15 | 15 |
| 16 #include "base/callback_forward.h" | 16 #include "base/callback_forward.h" |
| 17 #include "third_party/WebKit/Source/Platform/chromium/public/WebURL.h" | 17 #include "third_party/WebKit/public/platform/WebURL.h" |
| 18 #include "webkit/media/media_stream_client.h" | 18 #include "webkit/media/media_stream_client.h" |
| 19 | 19 |
| 20 namespace webkit_media { | 20 namespace webkit_media { |
| 21 class MediaStreamAudioRenderer; | 21 class MediaStreamAudioRenderer; |
| 22 } | 22 } |
| 23 | 23 |
| 24 namespace webkit_support { | 24 namespace webkit_support { |
| 25 | 25 |
| 26 class TestMediaStreamClient : public webkit_media::MediaStreamClient { | 26 class TestMediaStreamClient : public webkit_media::MediaStreamClient { |
| 27 public: | 27 public: |
| 28 TestMediaStreamClient(); | 28 TestMediaStreamClient(); |
| 29 virtual ~TestMediaStreamClient(); | 29 virtual ~TestMediaStreamClient(); |
| 30 | 30 |
| 31 // Implement webkit_media::MediaStreamClient. | 31 // Implement webkit_media::MediaStreamClient. |
| 32 virtual bool IsMediaStream(const GURL& url) OVERRIDE; | 32 virtual bool IsMediaStream(const GURL& url) OVERRIDE; |
| 33 virtual scoped_refptr<webkit_media::VideoFrameProvider> GetVideoFrameProvider( | 33 virtual scoped_refptr<webkit_media::VideoFrameProvider> GetVideoFrameProvider( |
| 34 const GURL& url, | 34 const GURL& url, |
| 35 const base::Closure& error_cb, | 35 const base::Closure& error_cb, |
| 36 const webkit_media::VideoFrameProvider::RepaintCB& repaint_cb) OVERRIDE; | 36 const webkit_media::VideoFrameProvider::RepaintCB& repaint_cb) OVERRIDE; |
| 37 virtual scoped_refptr<webkit_media::MediaStreamAudioRenderer> | 37 virtual scoped_refptr<webkit_media::MediaStreamAudioRenderer> |
| 38 GetAudioRenderer(const GURL& url) OVERRIDE; | 38 GetAudioRenderer(const GURL& url) OVERRIDE; |
| 39 }; | 39 }; |
| 40 | 40 |
| 41 } // namespace webkit_support | 41 } // namespace webkit_support |
| 42 | 42 |
| 43 #endif // WEBKIT_SUPPORT_TEST_MEDIA_STREAM_CLIENT_H_ | 43 #endif // WEBKIT_SUPPORT_TEST_MEDIA_STREAM_CLIENT_H_ |
| OLD | NEW |