| Index: content/browser/renderer_host/media/video_capture_host.cc
|
| diff --git a/content/browser/renderer_host/media/video_capture_host.cc b/content/browser/renderer_host/media/video_capture_host.cc
|
| index 4c458f5d0da72417407e3eefd565bb9d37e7cc44..e27e4700ad2de1de1fff7ed0fa2c55dbfe7436a9 100644
|
| --- a/content/browser/renderer_host/media/video_capture_host.cc
|
| +++ b/content/browser/renderer_host/media/video_capture_host.cc
|
| @@ -118,6 +118,18 @@ void VideoCaptureHost::OnEnded(VideoCaptureControllerID controller_id) {
|
| controller_id));
|
| }
|
|
|
| +void VideoCaptureHost::OnStarted(VideoCaptureControllerID controller_id) {
|
| + DVLOG(1) << __func__;
|
| + DCHECK_CURRENTLY_ON(BrowserThread::IO);
|
| + if (controllers_.find(controller_id) == controllers_.end())
|
| + return;
|
| +
|
| + if (base::ContainsKey(device_id_to_observer_map_, controller_id)) {
|
| + device_id_to_observer_map_[controller_id]->OnStateChanged(
|
| + mojom::VideoCaptureState::STARTED);
|
| + }
|
| +}
|
| +
|
| void VideoCaptureHost::Start(int32_t device_id,
|
| int32_t session_id,
|
| const media::VideoCaptureParams& params,
|
| @@ -306,11 +318,6 @@ void VideoCaptureHost::OnControllerAdded(
|
| return;
|
| }
|
|
|
| - if (base::ContainsKey(device_id_to_observer_map_, controller_id)) {
|
| - device_id_to_observer_map_[device_id]->OnStateChanged(
|
| - mojom::VideoCaptureState::STARTED);
|
| - }
|
| -
|
| DCHECK(!it->second);
|
| it->second = controller;
|
| }
|
|
|