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

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

Issue 10928043: Media Related changes for TabCapture API (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rename REQUEST_*->MEDIA_REQUEST_* Created 8 years, 2 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_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 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 media::FakeVideoCaptureDevice::Create(vc_device_name); 166 media::FakeVideoCaptureDevice::Create(vc_device_name);
167 } else { 167 } else {
168 switch (device.stream_type) { 168 switch (device.stream_type) {
169 case content::MEDIA_DEVICE_VIDEO_CAPTURE: 169 case content::MEDIA_DEVICE_VIDEO_CAPTURE:
170 video_capture_device = 170 video_capture_device =
171 media::VideoCaptureDevice::Create(vc_device_name); 171 media::VideoCaptureDevice::Create(vc_device_name);
172 break; 172 break;
173 case content::MEDIA_TAB_VIDEO_CAPTURE: 173 case content::MEDIA_TAB_VIDEO_CAPTURE:
174 // TODO(miu): Replace this stub with the actual implementation in a 174 // TODO(miu): Replace this stub with the actual implementation in a
175 // later change. 175 // later change.
176 // TODO(justinlin): This is so we don't get a null device. Remove later.
177 vc_device_name.unique_id = "/dev/video1";
176 video_capture_device = 178 video_capture_device =
177 media::FakeVideoCaptureDevice::Create(vc_device_name); 179 media::FakeVideoCaptureDevice::Create(vc_device_name);
178 break; 180 break;
179 default: 181 default:
180 NOTIMPLEMENTED(); 182 NOTIMPLEMENTED();
181 break; 183 break;
182 } 184 }
183 } 185 }
184 if (!video_capture_device) { 186 if (!video_capture_device) {
185 PostOnError(capture_session_id, kDeviceNotAvailable); 187 PostOnError(capture_session_id, kDeviceNotAvailable);
(...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after
526 528
527 VideoCaptureDevices::iterator dit = devices_.find(capture_session_id); 529 VideoCaptureDevices::iterator dit = devices_.find(capture_session_id);
528 if (dit != devices_.end()) { 530 if (dit != devices_.end()) {
529 return dit->second.capture_device; 531 return dit->second.capture_device;
530 } 532 }
531 } 533 }
532 return NULL; 534 return NULL;
533 } 535 }
534 536
535 } // namespace media_stream 537 } // namespace media_stream
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698