| Index: content/browser/renderer_host/media/audio_renderer_host.cc
|
| diff --git a/content/browser/renderer_host/media/audio_renderer_host.cc b/content/browser/renderer_host/media/audio_renderer_host.cc
|
| index ca963294d840dc746e7cfc613f8f5e49c368de3d..4fe5009a38eb0cf6a212ebb31a3b48665b1c20aa 100644
|
| --- a/content/browser/renderer_host/media/audio_renderer_host.cc
|
| +++ b/content/browser/renderer_host/media/audio_renderer_host.cc
|
| @@ -427,7 +427,8 @@ void AudioRendererHost::OnRequestDeviceAuthorization(
|
|
|
| if (!IsValidDeviceId(device_id)) {
|
| Send(new AudioMsg_NotifyDeviceAuthorized(
|
| - stream_id, media::OUTPUT_DEVICE_STATUS_ERROR_NOT_FOUND, DummyParams()));
|
| + stream_id, media::OUTPUT_DEVICE_STATUS_ERROR_NOT_FOUND, DummyParams(),
|
| + std::string()));
|
| return;
|
| }
|
|
|
| @@ -452,8 +453,15 @@ void AudioRendererHost::OnRequestDeviceAuthorization(
|
| authorizations_.insert(MakeAuthorizationData(
|
| stream_id, true, info->device.matched_output_device_id));
|
| MaybeFixAudioParameters(&output_params);
|
| + // Hash matched device id and pass it to the renderer
|
| + GURL gurl_security_origin = ConvertToGURL(security_origin);
|
| Send(new AudioMsg_NotifyDeviceAuthorized(
|
| - stream_id, media::OUTPUT_DEVICE_STATUS_OK, output_params));
|
| + stream_id, media::OUTPUT_DEVICE_STATUS_OK, output_params,
|
| + GetHMACForMediaDeviceID(
|
| + salt_callback_, gurl_security_origin,
|
| + info->device.matched_output_device_id.empty()
|
| + ? media::AudioManagerBase::kDefaultDeviceId
|
| + : info->device.matched_output_device_id)));
|
| return;
|
| }
|
| }
|
| @@ -482,7 +490,7 @@ void AudioRendererHost::OnDeviceAuthorized(int stream_id,
|
| authorizations_.erase(auth_data);
|
| Send(new AudioMsg_NotifyDeviceAuthorized(
|
| stream_id, media::OUTPUT_DEVICE_STATUS_ERROR_NOT_AUTHORIZED,
|
| - DummyParams()));
|
| + DummyParams(), std::string()));
|
| return;
|
| }
|
|
|
| @@ -521,7 +529,8 @@ void AudioRendererHost::OnDeviceIDTranslated(
|
| if (!device_found) {
|
| authorizations_.erase(auth_data);
|
| Send(new AudioMsg_NotifyDeviceAuthorized(
|
| - stream_id, media::OUTPUT_DEVICE_STATUS_ERROR_NOT_FOUND, DummyParams()));
|
| + stream_id, media::OUTPUT_DEVICE_STATUS_ERROR_NOT_FOUND, DummyParams(),
|
| + std::string()));
|
| return;
|
| }
|
|
|
| @@ -531,7 +540,7 @@ void AudioRendererHost::OnDeviceIDTranslated(
|
| media::AudioParameters output_params = device_info.output_params;
|
| MaybeFixAudioParameters(&output_params);
|
| Send(new AudioMsg_NotifyDeviceAuthorized(
|
| - stream_id, media::OUTPUT_DEVICE_STATUS_OK, output_params));
|
| + stream_id, media::OUTPUT_DEVICE_STATUS_OK, output_params, std::string()));
|
| }
|
|
|
| void AudioRendererHost::OnCreateStream(int stream_id,
|
|
|