Update MediaStreamDevicesController for Chrome 35
See https://codereview.chromium.org/180633008
This commit is contained in:
parent
e003cc9a0a
commit
3a71958e16
1 changed files with 3 additions and 2 deletions
|
@ -41,6 +41,7 @@ MediaStreamDevicesController::MediaStreamDevicesController(
|
||||||
MediaStreamDevicesController::~MediaStreamDevicesController() {
|
MediaStreamDevicesController::~MediaStreamDevicesController() {
|
||||||
if (!callback_.is_null()) {
|
if (!callback_.is_null()) {
|
||||||
callback_.Run(content::MediaStreamDevices(),
|
callback_.Run(content::MediaStreamDevices(),
|
||||||
|
content::MEDIA_DEVICE_INVALID_STATE,
|
||||||
scoped_ptr<content::MediaStreamUI>());
|
scoped_ptr<content::MediaStreamUI>());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -150,13 +151,13 @@ void MediaStreamDevicesController::Accept() {
|
||||||
|
|
||||||
content::MediaResponseCallback cb = callback_;
|
content::MediaResponseCallback cb = callback_;
|
||||||
callback_.Reset();
|
callback_.Reset();
|
||||||
cb.Run(devices, scoped_ptr<content::MediaStreamUI>());
|
cb.Run(devices, content::MEDIA_DEVICE_OK, scoped_ptr<content::MediaStreamUI>());
|
||||||
}
|
}
|
||||||
|
|
||||||
void MediaStreamDevicesController::Deny() {
|
void MediaStreamDevicesController::Deny() {
|
||||||
content::MediaResponseCallback cb = callback_;
|
content::MediaResponseCallback cb = callback_;
|
||||||
callback_.Reset();
|
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
|
} // namespace brightray
|
||||||
|
|
Loading…
Reference in a new issue