Clean the callback after executed
This commit is contained in:
parent
ea28f518d3
commit
09678cc485
2 changed files with 6 additions and 6 deletions
|
@ -159,7 +159,6 @@ void MediaCaptureDevicesDispatcher::OnAudioStreamStopped(
|
||||||
void MediaCaptureDevicesDispatcher::OnCreatingAudioStream(
|
void MediaCaptureDevicesDispatcher::OnCreatingAudioStream(
|
||||||
int render_process_id,
|
int render_process_id,
|
||||||
int render_view_id) {
|
int render_view_id) {
|
||||||
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace brightray
|
} // namespace brightray
|
||||||
|
|
|
@ -189,8 +189,9 @@ void MediaStreamDevicesController::HandleUserMediaRequest() {
|
||||||
screen_id.ToString(), "Screen"));
|
screen_id.ToString(), "Screen"));
|
||||||
}
|
}
|
||||||
|
|
||||||
callback_.Run(
|
content::MediaResponseCallback cb = callback_;
|
||||||
devices,
|
callback_.Reset();
|
||||||
|
cb.Run(devices,
|
||||||
devices.empty() ? content::MEDIA_DEVICE_INVALID_STATE :
|
devices.empty() ? content::MEDIA_DEVICE_INVALID_STATE :
|
||||||
content::MEDIA_DEVICE_OK,
|
content::MEDIA_DEVICE_OK,
|
||||||
scoped_ptr<content::MediaStreamUI>());
|
scoped_ptr<content::MediaStreamUI>());
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue