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

Side by Side Diff: content/browser/renderer_host/media/video_capture_host.cc

Issue 10912004: Begin adding support for tab mirroring via the MediaStream audio/video capturing (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add MediaStreamDispatcher IPC glue (and unittests) for new GenerateStreamForDevice() API. Created 8 years, 3 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
OLDNEW
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 #include "content/browser/renderer_host/media/video_capture_host.h" 5 #include "content/browser/renderer_host/media/video_capture_host.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/stl_util.h" 9 #include "base/stl_util.h"
10 #include "content/browser/browser_main_loop.h" 10 #include "content/browser/browser_main_loop.h"
11 #include "content/browser/renderer_host/media/media_stream_manager.h" 11 #include "content/browser/renderer_host/media/media_stream_manager.h"
12 #include "content/browser/renderer_host/media/video_capture_manager.h" 12 #include "content/browser/renderer_host/media/video_capture_manager.h"
13 #include "content/common/media/video_capture_messages.h" 13 #include "content/common/media/video_capture_messages.h"
14 #include "content/public/common/media_stream_request.h"
14 15
15 using content::BrowserMainLoop; 16 using content::BrowserMainLoop;
16 using content::BrowserMessageFilter; 17 using content::BrowserMessageFilter;
17 using content::BrowserThread; 18 using content::BrowserThread;
18 19
19 struct VideoCaptureHost::Entry { 20 struct VideoCaptureHost::Entry {
20 Entry(VideoCaptureController* controller) 21 Entry(VideoCaptureController* controller)
21 : controller(controller) {} 22 : controller(controller) {}
22 23
23 ~Entry() {} 24 ~Entry() {}
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after
272 if (controller) { 273 if (controller) {
273 controller->StopCapture(controller_id, this); 274 controller->StopCapture(controller_id, this);
274 GetVideoCaptureManager()->RemoveController(controller, this); 275 GetVideoCaptureManager()->RemoveController(controller, this);
275 } 276 }
276 delete it->second; 277 delete it->second;
277 entries_.erase(controller_id); 278 entries_.erase(controller_id);
278 } 279 }
279 280
280 media_stream::VideoCaptureManager* VideoCaptureHost::GetVideoCaptureManager() { 281 media_stream::VideoCaptureManager* VideoCaptureHost::GetVideoCaptureManager() {
281 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); 282 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
282 return BrowserMainLoop::GetMediaStreamManager()->video_capture_manager(); 283 // TODO(miu): Confirm use of VideoCaptureHostMsg_* only applies to the
284 // physical video capture devices, and does not have anything to do with
285 // MediaStreamHostMsg_*.
wjia(left Chromium) 2012/09/07 14:11:36 VideoCaptureHost should also take care of MEDIA_VI
miu 2012/09/07 23:14:28 This functionality isn't needed yet, since we only
286 return BrowserMainLoop::GetMediaStreamManager()->GetVideoCaptureManager(
287 content::MEDIA_VIDEO_DEVICE_CAPTURE);
283 } 288 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698