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

Unified Diff: content/test/test_media_stream_client.cc

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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/test/test_media_stream_client.h ('k') | content/test/test_video_frame_provider.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/test/test_media_stream_client.cc
diff --git a/content/shell/renderer/shell_media_stream_client.cc b/content/test/test_media_stream_client.cc
similarity index 77%
rename from content/shell/renderer/shell_media_stream_client.cc
rename to content/test/test_media_stream_client.cc
index 48580a6d6901583152568fb575165324408f3e36..01904f5b93a4e4340171c018065c864e61f08cb5 100644
--- a/content/shell/renderer/shell_media_stream_client.cc
+++ b/content/test/test_media_stream_client.cc
@@ -2,9 +2,9 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "content/shell/renderer/shell_media_stream_client.h"
+#include "content/test/test_media_stream_client.h"
-#include "content/shell/renderer/shell_video_frame_provider.h"
+#include "content/test/test_video_frame_provider.h"
#include "googleurl/src/gurl.h"
#include "third_party/WebKit/public/platform/WebMediaStream.h"
#include "third_party/WebKit/public/platform/WebMediaStreamTrack.h"
@@ -38,23 +38,24 @@ bool IsMockMediaStreamWithVideo(const WebURL& url) {
namespace content {
-ShellMediaStreamClient::ShellMediaStreamClient() {}
+TestMediaStreamClient::TestMediaStreamClient(RenderView* render_view)
+ : RenderViewObserver(render_view) {}
-ShellMediaStreamClient::~ShellMediaStreamClient() {}
+TestMediaStreamClient::~TestMediaStreamClient() {}
-bool ShellMediaStreamClient::IsMediaStream(const GURL& url) {
+bool TestMediaStreamClient::IsMediaStream(const GURL& url) {
return IsMockMediaStreamWithVideo(url);
}
scoped_refptr<webkit_media::VideoFrameProvider>
-ShellMediaStreamClient::GetVideoFrameProvider(
+TestMediaStreamClient::GetVideoFrameProvider(
const GURL& url,
const base::Closure& error_cb,
const webkit_media::VideoFrameProvider::RepaintCB& repaint_cb) {
if (!IsMockMediaStreamWithVideo(url))
return NULL;
- return new ShellVideoFrameProvider(
+ return new TestVideoFrameProvider(
gfx::Size(kVideoCaptureWidth, kVideoCaptureHeight),
base::TimeDelta::FromMilliseconds(kVideoCaptureFrameDurationMs),
error_cb,
@@ -62,7 +63,7 @@ ShellMediaStreamClient::GetVideoFrameProvider(
}
scoped_refptr<webkit_media::MediaStreamAudioRenderer>
-ShellMediaStreamClient::GetAudioRenderer(const GURL& url) {
+TestMediaStreamClient::GetAudioRenderer(const GURL& url) {
return NULL;
}
« no previous file with comments | « content/test/test_media_stream_client.h ('k') | content/test/test_video_frame_provider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698