Update MediaStreamDevicesController for Chrome 35

See https://codereview.chromium.org/180633008
This commit is contained in:
Adam Roben 2014-06-26 16:31:55 -04:00
parent e003cc9a0a
commit 3a71958e16

View file

@ -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