| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/renderer_host/media/media_stream_manager.h" | 10 #include "content/browser/renderer_host/media/media_stream_manager.h" |
| 11 #include "content/browser/renderer_host/media/video_capture_manager.h" | 11 #include "content/browser/renderer_host/media/video_capture_manager.h" |
| 12 #include "content/browser/resource_context.h" | |
| 13 #include "content/common/media/video_capture_messages.h" | 12 #include "content/common/media/video_capture_messages.h" |
| 13 #include "content/public/browser/resource_context.h" |
| 14 | 14 |
| 15 using content::BrowserMessageFilter; | 15 using content::BrowserMessageFilter; |
| 16 using content::BrowserThread; | 16 using content::BrowserThread; |
| 17 | 17 |
| 18 struct VideoCaptureHost::Entry { | 18 struct VideoCaptureHost::Entry { |
| 19 Entry() : state(video_capture::kStopped) {} | 19 Entry() : state(video_capture::kStopped) {} |
| 20 | 20 |
| 21 Entry(VideoCaptureController* controller, video_capture::State state) | 21 Entry(VideoCaptureController* controller, video_capture::State state) |
| 22 : controller(controller), | 22 : controller(controller), |
| 23 state(state) { | 23 state(state) { |
| (...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 280 } | 280 } |
| 281 delete it->second; | 281 delete it->second; |
| 282 entries_.erase(id); | 282 entries_.erase(id); |
| 283 } | 283 } |
| 284 } | 284 } |
| 285 | 285 |
| 286 media_stream::VideoCaptureManager* VideoCaptureHost::GetVideoCaptureManager() { | 286 media_stream::VideoCaptureManager* VideoCaptureHost::GetVideoCaptureManager() { |
| 287 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); | 287 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
| 288 return resource_context_->GetMediaStreamManager()->video_capture_manager(); | 288 return resource_context_->GetMediaStreamManager()->video_capture_manager(); |
| 289 } | 289 } |
| OLD | NEW |