| 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_controller.h" | 5 #include "content/browser/renderer_host/media/video_capture_controller.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <map> | 10 #include <map> |
| (...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 140 } | 140 } |
| 141 | 141 |
| 142 base::WeakPtr<VideoCaptureController> | 142 base::WeakPtr<VideoCaptureController> |
| 143 VideoCaptureController::GetWeakPtrForIOThread() { | 143 VideoCaptureController::GetWeakPtrForIOThread() { |
| 144 return weak_ptr_factory_.GetWeakPtr(); | 144 return weak_ptr_factory_.GetWeakPtr(); |
| 145 } | 145 } |
| 146 | 146 |
| 147 std::unique_ptr<media::VideoCaptureDevice::Client> | 147 std::unique_ptr<media::VideoCaptureDevice::Client> |
| 148 VideoCaptureController::NewDeviceClient() { | 148 VideoCaptureController::NewDeviceClient() { |
| 149 DCHECK_CURRENTLY_ON(BrowserThread::IO); | 149 DCHECK_CURRENTLY_ON(BrowserThread::IO); |
| 150 return base::WrapUnique(new VideoCaptureDeviceClient( | 150 return base::MakeUnique<VideoCaptureDeviceClient>( |
| 151 this->GetWeakPtrForIOThread(), buffer_pool_)); | 151 this->GetWeakPtrForIOThread(), buffer_pool_); |
| 152 } | 152 } |
| 153 | 153 |
| 154 void VideoCaptureController::AddClient( | 154 void VideoCaptureController::AddClient( |
| 155 VideoCaptureControllerID id, | 155 VideoCaptureControllerID id, |
| 156 VideoCaptureControllerEventHandler* event_handler, | 156 VideoCaptureControllerEventHandler* event_handler, |
| 157 base::ProcessHandle render_process, | 157 base::ProcessHandle render_process, |
| 158 media::VideoCaptureSessionId session_id, | 158 media::VideoCaptureSessionId session_id, |
| 159 const media::VideoCaptureParams& params) { | 159 const media::VideoCaptureParams& params) { |
| 160 DCHECK_CURRENTLY_ON(BrowserThread::IO); | 160 DCHECK_CURRENTLY_ON(BrowserThread::IO); |
| 161 DVLOG(1) << "VideoCaptureController::AddClient() -- id=" << id | 161 DVLOG(1) << "VideoCaptureController::AddClient() -- id=" << id |
| (...skipping 345 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 507 int session_id, | 507 int session_id, |
| 508 const ControllerClients& clients) { | 508 const ControllerClients& clients) { |
| 509 for (auto* client : clients) { | 509 for (auto* client : clients) { |
| 510 if (client->session_id == session_id) | 510 if (client->session_id == session_id) |
| 511 return client; | 511 return client; |
| 512 } | 512 } |
| 513 return NULL; | 513 return NULL; |
| 514 } | 514 } |
| 515 | 515 |
| 516 } // namespace content | 516 } // namespace content |
| OLD | NEW |