mirror of
https://github.com/electron/electron.git
synced 2026-01-29 01:08:18 -05:00
Update MediaStreamDevicesController for Chrome 35
See https://codereview.chromium.org/180633008
This commit is contained in:
@@ -41,6 +41,7 @@ MediaStreamDevicesController::MediaStreamDevicesController(
|
||||
MediaStreamDevicesController::~MediaStreamDevicesController() {
|
||||
if (!callback_.is_null()) {
|
||||
callback_.Run(content::MediaStreamDevices(),
|
||||
content::MEDIA_DEVICE_INVALID_STATE,
|
||||
scoped_ptr<content::MediaStreamUI>());
|
||||
}
|
||||
}
|
||||
@@ -150,13 +151,13 @@ void MediaStreamDevicesController::Accept() {
|
||||
|
||||
content::MediaResponseCallback cb = callback_;
|
||||
callback_.Reset();
|
||||
cb.Run(devices, scoped_ptr<content::MediaStreamUI>());
|
||||
cb.Run(devices, content::MEDIA_DEVICE_OK, scoped_ptr<content::MediaStreamUI>());
|
||||
}
|
||||
|
||||
void MediaStreamDevicesController::Deny() {
|
||||
content::MediaResponseCallback cb = callback_;
|
||||
callback_.Reset();
|
||||
cb.Run(content::MediaStreamDevices(), scoped_ptr<content::MediaStreamUI>());
|
||||
cb.Run(content::MediaStreamDevices(), content::MEDIA_DEVICE_PERMISSION_DENIED, scoped_ptr<content::MediaStreamUI>());
|
||||
}
|
||||
|
||||
} // namespace brightray
|
||||
|
||||
Reference in New Issue
Block a user