| OLD | NEW |
| 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/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 206 #endif // defined(ENABLE_SCREEN_CAPTURE) | 206 #endif // defined(ENABLE_SCREEN_CAPTURE) |
| 207 break; | 207 break; |
| 208 } | 208 } |
| 209 default: { | 209 default: { |
| 210 NOTIMPLEMENTED(); | 210 NOTIMPLEMENTED(); |
| 211 break; | 211 break; |
| 212 } | 212 } |
| 213 } | 213 } |
| 214 | 214 |
| 215 if (!video_capture_device) { | 215 if (!video_capture_device) { |
| 216 device_client->OnError(); | 216 device_client->OnError("Could not create capture device"); |
| 217 return; | 217 return; |
| 218 } | 218 } |
| 219 | 219 |
| 220 video_capture_device->AllocateAndStart(params, device_client.Pass()); | 220 video_capture_device->AllocateAndStart(params, device_client.Pass()); |
| 221 entry->video_capture_device = video_capture_device.Pass(); | 221 entry->video_capture_device = video_capture_device.Pass(); |
| 222 } | 222 } |
| 223 | 223 |
| 224 void VideoCaptureManager::StartCaptureForClient( | 224 void VideoCaptureManager::StartCaptureForClient( |
| 225 media::VideoCaptureSessionId session_id, | 225 media::VideoCaptureSessionId session_id, |
| 226 const media::VideoCaptureParams& params, | 226 const media::VideoCaptureParams& params, |
| (...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 544 DeviceInfos& device_vector) { | 544 DeviceInfos& device_vector) { |
| 545 for (DeviceInfos::iterator it = device_vector.begin(); | 545 for (DeviceInfos::iterator it = device_vector.begin(); |
| 546 it != device_vector.end(); ++it) { | 546 it != device_vector.end(); ++it) { |
| 547 if (it->name.id() == id) | 547 if (it->name.id() == id) |
| 548 return &(*it); | 548 return &(*it); |
| 549 } | 549 } |
| 550 return NULL; | 550 return NULL; |
| 551 } | 551 } |
| 552 | 552 |
| 553 } // namespace content | 553 } // namespace content |
| OLD | NEW |