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

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

Issue 264773002: Start moving WebUserMediaClient on the chromium side to be per frame instead of view. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 6 years, 7 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/test_media_stream_client.h ('k') | no next file » | 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 #include "content/test/test_media_stream_client.h" 5 #include "content/test/test_media_stream_client.h"
6 6
7 #include "content/renderer/media/media_stream_audio_renderer.h" 7 #include "content/renderer/media/media_stream_audio_renderer.h"
8 #include "content/test/test_video_frame_provider.h" 8 #include "content/test/test_video_frame_provider.h"
9 #include "third_party/WebKit/public/platform/WebMediaStream.h" 9 #include "third_party/WebKit/public/platform/WebMediaStream.h"
10 #include "third_party/WebKit/public/platform/WebMediaStreamTrack.h" 10 #include "third_party/WebKit/public/platform/WebMediaStreamTrack.h"
(...skipping 19 matching lines...) Expand all
30 return video_tracks.size() > 0; 30 return video_tracks.size() > 0;
31 #else 31 #else
32 return false; 32 return false;
33 #endif 33 #endif
34 } 34 }
35 35
36 } // namespace 36 } // namespace
37 37
38 namespace content { 38 namespace content {
39 39
40 TestMediaStreamClient::TestMediaStreamClient(RenderView* render_view) 40 TestMediaStreamClient::TestMediaStreamClient(RenderFrame* render_frame)
41 : RenderViewObserver(render_view) {} 41 : RenderFrameObserver(render_frame) {}
42 42
43 TestMediaStreamClient::~TestMediaStreamClient() {} 43 TestMediaStreamClient::~TestMediaStreamClient() {}
44 44
45 bool TestMediaStreamClient::IsMediaStream(const GURL& url) { 45 bool TestMediaStreamClient::IsMediaStream(const GURL& url) {
46 return IsMockMediaStreamWithVideo(url); 46 return IsMockMediaStreamWithVideo(url);
47 } 47 }
48 48
49 scoped_refptr<VideoFrameProvider> TestMediaStreamClient::GetVideoFrameProvider( 49 scoped_refptr<VideoFrameProvider> TestMediaStreamClient::GetVideoFrameProvider(
50 const GURL& url, 50 const GURL& url,
51 const base::Closure& error_cb, 51 const base::Closure& error_cb,
52 const VideoFrameProvider::RepaintCB& repaint_cb) { 52 const VideoFrameProvider::RepaintCB& repaint_cb) {
53 if (!IsMockMediaStreamWithVideo(url)) 53 if (!IsMockMediaStreamWithVideo(url))
54 return NULL; 54 return NULL;
55 55
56 return new TestVideoFrameProvider( 56 return new TestVideoFrameProvider(
57 gfx::Size(kVideoCaptureWidth, kVideoCaptureHeight), 57 gfx::Size(kVideoCaptureWidth, kVideoCaptureHeight),
58 base::TimeDelta::FromMilliseconds(kVideoCaptureFrameDurationMs), 58 base::TimeDelta::FromMilliseconds(kVideoCaptureFrameDurationMs),
59 error_cb, 59 error_cb,
60 repaint_cb); 60 repaint_cb);
61 } 61 }
62 62
63 scoped_refptr<MediaStreamAudioRenderer> TestMediaStreamClient::GetAudioRenderer( 63 scoped_refptr<MediaStreamAudioRenderer> TestMediaStreamClient::GetAudioRenderer(
64 const GURL& url, int render_frame_id) { 64 const GURL& url, int render_frame_id) {
65 return NULL; 65 return NULL;
66 } 66 }
67 67
68 } // namespace content 68 } // namespace content
OLDNEW
« no previous file with comments | « content/test/test_media_stream_client.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698