Chromium Code Reviews| Index: components/arc/audio/arc_audio_bridge.cc |
| diff --git a/components/arc/audio/arc_audio_bridge.cc b/components/arc/audio/arc_audio_bridge.cc |
| index 9a0da08829a5e88cb2ac299b71b027dd542637fd..a3eb2719f21404eb3d926b07b8738c685de5025b 100644 |
| --- a/components/arc/audio/arc_audio_bridge.cc |
| +++ b/components/arc/audio/arc_audio_bridge.cc |
| @@ -39,6 +39,16 @@ void ArcAudioBridge::ShowVolumeControls() { |
| ash::TrayAudio::ShowPopUpVolumeView(); |
| } |
| +void ArcAudioBridge::OnSystemVolumeUpdateRequest(int32_t percent) { |
| + if (percent < 0 || percent > 100) |
| + return; |
| + cras_audio_handler_->SetOutputVolumePercent(percent); |
| + bool is_muted = |
| + percent <= cras_audio_handler_->GetOutputDefaultVolumeMuteThreshold(); |
|
dcheng
2017/06/06 18:45:38
FWIW, it seems like this is already down in CrasAu
yueli
2017/06/06 20:01:40
IIUC SetOutputMute will change the device mute set
|
| + if (cras_audio_handler_->IsOutputMuted() != is_muted) |
| + cras_audio_handler_->SetOutputMute(is_muted); |
| +} |
| + |
| void ArcAudioBridge::OnAudioNodesChanged() { |
| uint64_t output_id = cras_audio_handler_->GetPrimaryActiveOutputNode(); |
| const chromeos::AudioDevice* output_device = |