| 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 <memory> | 7 #include <memory> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
| 11 #include "base/memory/ptr_util.h" |
| 11 #include "content/browser/browser_main_loop.h" | 12 #include "content/browser/browser_main_loop.h" |
| 12 #include "content/browser/renderer_host/media/media_stream_manager.h" | 13 #include "content/browser/renderer_host/media/media_stream_manager.h" |
| 13 #include "content/browser/renderer_host/media/video_capture_manager.h" | 14 #include "content/browser/renderer_host/media/video_capture_manager.h" |
| 14 #include "mojo/public/cpp/bindings/strong_binding.h" | 15 #include "mojo/public/cpp/bindings/strong_binding.h" |
| 15 | 16 |
| 16 namespace content { | 17 namespace content { |
| 17 | 18 |
| 18 VideoCaptureHost::VideoCaptureHost(MediaStreamManager* media_stream_manager) | 19 VideoCaptureHost::VideoCaptureHost(MediaStreamManager* media_stream_manager) |
| 19 : media_stream_manager_(media_stream_manager), | 20 : media_stream_manager_(media_stream_manager), |
| 20 weak_factory_(this) { | 21 weak_factory_(this) { |
| (...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 326 const base::WeakPtr<VideoCaptureController> controller = it->second; | 327 const base::WeakPtr<VideoCaptureController> controller = it->second; |
| 327 controllers_.erase(it); | 328 controllers_.erase(it); |
| 328 if (!controller) | 329 if (!controller) |
| 329 return; | 330 return; |
| 330 | 331 |
| 331 media_stream_manager_->video_capture_manager()->StopCaptureForClient( | 332 media_stream_manager_->video_capture_manager()->StopCaptureForClient( |
| 332 controller.get(), controller_id, this, on_error); | 333 controller.get(), controller_id, this, on_error); |
| 333 } | 334 } |
| 334 | 335 |
| 335 } // namespace content | 336 } // namespace content |
| OLD | NEW |