| 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_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 | 14 |
| 15 namespace content { | 15 namespace content { |
| 16 | 16 |
| 17 struct VideoCaptureHost::Entry { | 17 struct VideoCaptureHost::Entry { |
| 18 Entry(VideoCaptureController* controller) | 18 explicit Entry(VideoCaptureController* controller) |
| 19 : controller(controller) {} | 19 : controller(controller) {} |
| 20 | 20 |
| 21 ~Entry() {} | 21 ~Entry() {} |
| 22 | 22 |
| 23 scoped_refptr<VideoCaptureController> controller; | 23 scoped_refptr<VideoCaptureController> controller; |
| 24 }; | 24 }; |
| 25 | 25 |
| 26 VideoCaptureHost::VideoCaptureHost() {} | 26 VideoCaptureHost::VideoCaptureHost() {} |
| 27 | 27 |
| 28 VideoCaptureHost::~VideoCaptureHost() {} | 28 VideoCaptureHost::~VideoCaptureHost() {} |
| (...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 273 delete it->second; | 273 delete it->second; |
| 274 entries_.erase(controller_id); | 274 entries_.erase(controller_id); |
| 275 } | 275 } |
| 276 | 276 |
| 277 VideoCaptureManager* VideoCaptureHost::GetVideoCaptureManager() { | 277 VideoCaptureManager* VideoCaptureHost::GetVideoCaptureManager() { |
| 278 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); | 278 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
| 279 return BrowserMainLoop::GetMediaStreamManager()->video_capture_manager(); | 279 return BrowserMainLoop::GetMediaStreamManager()->video_capture_manager(); |
| 280 } | 280 } |
| 281 | 281 |
| 282 } // namespace content | 282 } // namespace content |
| OLD | NEW |