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

Side by Side Diff: content/test/test_media_stream_client.h

Issue 18590002: Migrate MediaStream test code from content/shell/renderer/ to content/test/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 5 months 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « content/test/layouttest_support.cc ('k') | content/test/test_media_stream_client.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_SHELL_RENDERER_SHELL_MEDIA_STREAM_CLIENT_H_ 5 #ifndef CONTENT_TEST_TEST_MEDIA_STREAM_CLIENT_H_
6 #define CONTENT_SHELL_RENDERER_SHELL_MEDIA_STREAM_CLIENT_H_ 6 #define CONTENT_TEST_TEST_MEDIA_STREAM_CLIENT_H_
7 7
8 #include "base/callback_forward.h" 8 #include "base/callback_forward.h"
9 #include "content/public/renderer/render_view_observer.h"
9 #include "third_party/WebKit/public/platform/WebURL.h" 10 #include "third_party/WebKit/public/platform/WebURL.h"
10 #include "webkit/renderer/media/media_stream_client.h" 11 #include "webkit/renderer/media/media_stream_client.h"
11 12
12 namespace content { 13 namespace content {
13 14
14 // ShellMediaStreamClient is a mock implementation of 15 // TestMediaStreamClient is a mock implementation of
15 // webkit_media::MediaStreamClient used when running layout tests. 16 // webkit_media::MediaStreamClient used when running layout tests.
16 class ShellMediaStreamClient : public webkit_media::MediaStreamClient { 17 class TestMediaStreamClient : public RenderViewObserver,
18 public webkit_media::MediaStreamClient {
17 public: 19 public:
18 ShellMediaStreamClient(); 20 explicit TestMediaStreamClient(RenderView* render_view);
19 virtual ~ShellMediaStreamClient(); 21 virtual ~TestMediaStreamClient();
20 22
21 // webkit_media::MediaStreamClient implementation. 23 // webkit_media::MediaStreamClient implementation.
22 virtual bool IsMediaStream(const GURL& url) OVERRIDE; 24 virtual bool IsMediaStream(const GURL& url) OVERRIDE;
23 virtual scoped_refptr<webkit_media::VideoFrameProvider> GetVideoFrameProvider( 25 virtual scoped_refptr<webkit_media::VideoFrameProvider> GetVideoFrameProvider(
24 const GURL& url, 26 const GURL& url,
25 const base::Closure& error_cb, 27 const base::Closure& error_cb,
26 const webkit_media::VideoFrameProvider::RepaintCB& repaint_cb) OVERRIDE; 28 const webkit_media::VideoFrameProvider::RepaintCB& repaint_cb) OVERRIDE;
27 virtual scoped_refptr<webkit_media::MediaStreamAudioRenderer> 29 virtual scoped_refptr<webkit_media::MediaStreamAudioRenderer>
28 GetAudioRenderer(const GURL& url) OVERRIDE; 30 GetAudioRenderer(const GURL& url) OVERRIDE;
29 }; 31 };
30 32
31 } // namespace content 33 } // namespace content
32 34
33 #endif // CONTENT_SHELL_RENDERER_SHELL_MEDIA_STREAM_CLIENT_H_ 35 #endif // CONTENT_TEST_TEST_MEDIA_STREAM_CLIENT_H_
OLDNEW
« no previous file with comments | « content/test/layouttest_support.cc ('k') | content/test/test_media_stream_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698