MEDIA_LOOPBACK_AUDIO_CAPTURE renamed to MEDIA_DESKTOP_AUDIO_CAPTURE

This commit is contained in:
Cheng Zhao 2015-03-08 20:04:25 -07:00
parent bb8da7ec7e
commit 56a1691588
2 changed files with 7 additions and 7 deletions

View file

@ -51,7 +51,7 @@ bool MediaStreamDevicesController::TakeAction() {
// Do special handling of desktop screen cast. // Do special handling of desktop screen cast.
if (request_.audio_type == content::MEDIA_TAB_AUDIO_CAPTURE || if (request_.audio_type == content::MEDIA_TAB_AUDIO_CAPTURE ||
request_.video_type == content::MEDIA_TAB_VIDEO_CAPTURE || request_.video_type == content::MEDIA_TAB_VIDEO_CAPTURE ||
request_.audio_type == content::MEDIA_LOOPBACK_AUDIO_CAPTURE || request_.audio_type == content::MEDIA_DESKTOP_AUDIO_CAPTURE ||
request_.video_type == content::MEDIA_DESKTOP_VIDEO_CAPTURE) { request_.video_type == content::MEDIA_DESKTOP_VIDEO_CAPTURE) {
HandleUserMediaRequest(); HandleUserMediaRequest();
return true; return true;
@ -59,7 +59,7 @@ bool MediaStreamDevicesController::TakeAction() {
// Deny the request if there is no device attached to the OS. // Deny the request if there is no device attached to the OS.
if (!HasAnyAvailableDevice()) { if (!HasAnyAvailableDevice()) {
Deny(); Deny(content::MEDIA_DEVICE_NO_HARDWARE);
return true; return true;
} }
@ -149,11 +149,11 @@ void MediaStreamDevicesController::Accept() {
cb.Run(devices, content::MEDIA_DEVICE_OK, scoped_ptr<content::MediaStreamUI>()); cb.Run(devices, content::MEDIA_DEVICE_OK, scoped_ptr<content::MediaStreamUI>());
} }
void MediaStreamDevicesController::Deny() { void MediaStreamDevicesController::Deny(content::MediaStreamRequestResult result) {
content::MediaResponseCallback cb = callback_; content::MediaResponseCallback cb = callback_;
callback_.Reset(); callback_.Reset();
cb.Run(content::MediaStreamDevices(), cb.Run(content::MediaStreamDevices(),
content::MEDIA_DEVICE_PERMISSION_DENIED, result,
scoped_ptr<content::MediaStreamUI>()); scoped_ptr<content::MediaStreamUI>());
} }
@ -168,9 +168,9 @@ void MediaStreamDevicesController::HandleUserMediaRequest() {
devices.push_back(content::MediaStreamDevice( devices.push_back(content::MediaStreamDevice(
content::MEDIA_TAB_VIDEO_CAPTURE, "", "")); content::MEDIA_TAB_VIDEO_CAPTURE, "", ""));
} }
if (request_.audio_type == content::MEDIA_LOOPBACK_AUDIO_CAPTURE) { if (request_.audio_type == content::MEDIA_DESKTOP_AUDIO_CAPTURE) {
devices.push_back(content::MediaStreamDevice( devices.push_back(content::MediaStreamDevice(
content::MEDIA_LOOPBACK_AUDIO_CAPTURE, "loopback", "System Audio")); content::MEDIA_DESKTOP_AUDIO_CAPTURE, "loopback", "System Audio"));
} }
if (request_.video_type == content::MEDIA_DESKTOP_VIDEO_CAPTURE) { if (request_.video_type == content::MEDIA_DESKTOP_VIDEO_CAPTURE) {
content::DesktopMediaID screen_id; content::DesktopMediaID screen_id;

View file

@ -23,7 +23,7 @@ class MediaStreamDevicesController {
// Explicitly accept or deny the request. // Explicitly accept or deny the request.
void Accept(); void Accept();
void Deny(); void Deny(content::MediaStreamRequestResult result);
private: private:
// Handle the request of desktop or tab screen cast. // Handle the request of desktop or tab screen cast.