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

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

Issue 270263008: Add a ChromeOS implementation of VideoCaptureDevice (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase 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 | « no previous file | media/media.gyp » ('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 (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_manager.h" 5 #include "content/browser/renderer_host/media/video_capture_manager.h"
6 6
7 #include <set> 7 #include <set>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 193
194 scoped_ptr<media::VideoCaptureDevice> video_capture_device; 194 scoped_ptr<media::VideoCaptureDevice> video_capture_device;
195 switch (entry->stream_type) { 195 switch (entry->stream_type) {
196 case MEDIA_DEVICE_VIDEO_CAPTURE: { 196 case MEDIA_DEVICE_VIDEO_CAPTURE: {
197 // We look up the device id from the renderer in our local enumeration 197 // We look up the device id from the renderer in our local enumeration
198 // since the renderer does not have all the information that might be 198 // since the renderer does not have all the information that might be
199 // held in the browser-side VideoCaptureDevice::Name structure. 199 // held in the browser-side VideoCaptureDevice::Name structure.
200 DeviceInfo* found = FindDeviceInfoById(entry->id, devices_info_cache_); 200 DeviceInfo* found = FindDeviceInfoById(entry->id, devices_info_cache_);
201 if (found) { 201 if (found) {
202 video_capture_device = 202 video_capture_device =
203 video_capture_device_factory_->Create(found->name); 203 video_capture_device_factory_->Create(
204 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI),
205 found->name);
204 } 206 }
205 break; 207 break;
206 } 208 }
207 case MEDIA_TAB_VIDEO_CAPTURE: { 209 case MEDIA_TAB_VIDEO_CAPTURE: {
208 video_capture_device.reset( 210 video_capture_device.reset(
209 WebContentsVideoCaptureDevice::Create(entry->id)); 211 WebContentsVideoCaptureDevice::Create(entry->id));
210 break; 212 break;
211 } 213 }
212 case MEDIA_DESKTOP_VIDEO_CAPTURE: { 214 case MEDIA_DESKTOP_VIDEO_CAPTURE: {
213 #if defined(ENABLE_SCREEN_CAPTURE) 215 #if defined(ENABLE_SCREEN_CAPTURE)
(...skipping 398 matching lines...) Expand 10 before | Expand all | Expand 10 after
612 void VideoCaptureManager::SaveDesktopCaptureWindowIdOnDeviceThread( 614 void VideoCaptureManager::SaveDesktopCaptureWindowIdOnDeviceThread(
613 media::VideoCaptureSessionId session_id, 615 media::VideoCaptureSessionId session_id,
614 gfx::NativeViewId window_id) { 616 gfx::NativeViewId window_id) {
615 DCHECK(IsOnDeviceThread()); 617 DCHECK(IsOnDeviceThread());
616 DCHECK(notification_window_ids_.find(session_id) == 618 DCHECK(notification_window_ids_.find(session_id) ==
617 notification_window_ids_.end()); 619 notification_window_ids_.end());
618 notification_window_ids_[session_id] = window_id; 620 notification_window_ids_[session_id] = window_id;
619 } 621 }
620 622
621 } // namespace content 623 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | media/media.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698