| 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/resource_context.h" | 11 #include "content/browser/resource_context.h" |
| 12 #include "content/common/media/video_capture_messages.h" | 12 #include "content/common/media/video_capture_messages.h" |
| 13 | 13 |
| 14 using content::BrowserThread; |
| 15 |
| 14 VideoCaptureHost::VideoCaptureHost( | 16 VideoCaptureHost::VideoCaptureHost( |
| 15 const content::ResourceContext* resource_context) | 17 const content::ResourceContext* resource_context) |
| 16 : resource_context_(resource_context) { | 18 : resource_context_(resource_context) { |
| 17 } | 19 } |
| 18 | 20 |
| 19 VideoCaptureHost::~VideoCaptureHost() {} | 21 VideoCaptureHost::~VideoCaptureHost() {} |
| 20 | 22 |
| 21 void VideoCaptureHost::OnChannelClosing() { | 23 void VideoCaptureHost::OnChannelClosing() { |
| 22 BrowserMessageFilter::OnChannelClosing(); | 24 BrowserMessageFilter::OnChannelClosing(); |
| 23 | 25 |
| (...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 194 | 196 |
| 195 void VideoCaptureHost::DoDeleteVideoCaptureController( | 197 void VideoCaptureHost::DoDeleteVideoCaptureController( |
| 196 const VideoCaptureControllerID& id) { | 198 const VideoCaptureControllerID& id) { |
| 197 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); | 199 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
| 198 | 200 |
| 199 // Report that the device have successfully been stopped. | 201 // Report that the device have successfully been stopped. |
| 200 Send(new VideoCaptureMsg_StateChanged(id.device_id, | 202 Send(new VideoCaptureMsg_StateChanged(id.device_id, |
| 201 media::VideoCapture::kStopped)); | 203 media::VideoCapture::kStopped)); |
| 202 entries_.erase(id); | 204 entries_.erase(id); |
| 203 } | 205 } |
| OLD | NEW |