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 bdf7e4feafce96eb955d6e98bff5e3a6a36b2686..979d4b007fad58a483de3a682adc226ab31178e5 100644 |
| --- a/components/arc/audio/arc_audio_bridge.cc |
| +++ b/components/arc/audio/arc_audio_bridge.cc |
| @@ -39,6 +39,14 @@ void ArcAudioBridge::ShowVolumeControls() { |
| ash::TrayAudio::ShowPopUpVolumeView(); |
| } |
| +void ArcAudioBridge::OnVolumeUpdateRequest(float volume) { |
| + cras_audio_handler_->SetOutputVolumePercent(volume); |
|
dcheng
2017/04/14 03:36:42
This should check that the input is in range.
(Ou
yueli
2017/06/02 19:10:13
It seems the range is already handled in SetOutput
dcheng
2017/06/02 23:25:35
This is OK, but I will note that it makes it a bit
yueli
2017/06/06 16:43:09
Done.
|
| + bool is_muted = |
| + volume <= cras_audio_handler_->GetOutputDefaultVolumeMuteThreshold(); |
| + 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 = |