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(
|
||||
int render_process_id,
|
||||
int render_view_id) {
|
||||
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
|
||||
}
|
||||
|
||||
} // namespace brightray
|
||||
|
|
|
@ -189,11 +189,12 @@ void MediaStreamDevicesController::HandleUserMediaRequest() {
|
|||
screen_id.ToString(), "Screen"));
|
||||
}
|
||||
|
||||
callback_.Run(
|
||||
devices,
|
||||
devices.empty() ? content::MEDIA_DEVICE_INVALID_STATE :
|
||||
content::MEDIA_DEVICE_OK,
|
||||
scoped_ptr<content::MediaStreamUI>());
|
||||
content::MediaResponseCallback cb = callback_;
|
||||
callback_.Reset();
|
||||
cb.Run(devices,
|
||||
devices.empty() ? content::MEDIA_DEVICE_INVALID_STATE :
|
||||
content::MEDIA_DEVICE_OK,
|
||||
scoped_ptr<content::MediaStreamUI>());
|
||||
}
|
||||
|
||||
} // namespace brightray
|
||||
|
|
Loading…
Add table
Reference in a new issue