Index: content/renderer/media/video_capture_impl_manager.cc |
diff --git a/content/renderer/media/video_capture_impl_manager.cc b/content/renderer/media/video_capture_impl_manager.cc |
index 678dfef28cfeb12101ce5e0ece224bb17656fabf..4d64fc8e9c9b7dc305dbbbd75d8b25a1a26a00e7 100644 |
--- a/content/renderer/media/video_capture_impl_manager.cc |
+++ b/content/renderer/media/video_capture_impl_manager.cc |
@@ -46,7 +46,6 @@ struct VideoCaptureImplManager::DeviceEntry { |
// This is set to true if this device is being suspended, via |
// VideoCaptureImplManager::Suspend(). |
- // See also: VideoCaptureImplManager::is_suspending_all_. |
bool is_individually_suspended; |
DeviceEntry() |
@@ -59,7 +58,6 @@ struct VideoCaptureImplManager::DeviceEntry { |
VideoCaptureImplManager::VideoCaptureImplManager() |
: next_client_id_(0), |
render_main_task_runner_(base::ThreadTaskRunnerHandle::Get()), |
- is_suspending_all_(false), |
weak_factory_(this) {} |
VideoCaptureImplManager::~VideoCaptureImplManager() { |
@@ -151,8 +149,6 @@ void VideoCaptureImplManager::Suspend(media::VideoCaptureSessionId id) { |
if (it->client_count > 1) |
return; // Punt when there is >1 client (see comments in UseDevice()). |
it->is_individually_suspended = true; |
- if (is_suspending_all_) |
- return; // Device should already be suspended. |
ChildProcess::current()->io_task_runner()->PostTask( |
FROM_HERE, base::Bind(&VideoCaptureImpl::SuspendCapture, |
base::Unretained(it->impl.get()), true)); |
@@ -167,8 +163,6 @@ void VideoCaptureImplManager::Resume(media::VideoCaptureSessionId id) { |
if (!it->is_individually_suspended) |
return; // Device was not individually suspended. |
it->is_individually_suspended = false; |
- if (is_suspending_all_) |
- return; // Device must remain suspended until all are resumed. |
ChildProcess::current()->io_task_runner()->PostTask( |
FROM_HERE, base::Bind(&VideoCaptureImpl::SuspendCapture, |
base::Unretained(it->impl.get()), false)); |
@@ -234,18 +228,4 @@ void VideoCaptureImplManager::UnrefDevice( |
devices_.erase(it); |
} |
-void VideoCaptureImplManager::SuspendDevices(bool suspend) { |
- DCHECK(render_main_task_runner_->BelongsToCurrentThread()); |
- if (is_suspending_all_ == suspend) |
- return; |
- is_suspending_all_ = suspend; |
- for (auto& entry : devices_) { |
- if (entry.is_individually_suspended) |
- continue; // Either: 1) Already suspended; or 2) Should not be resumed. |
- ChildProcess::current()->io_task_runner()->PostTask( |
- FROM_HERE, base::Bind(&VideoCaptureImpl::SuspendCapture, |
- base::Unretained(entry.impl.get()), suspend)); |
- } |
-} |
- |
} // namespace content |