diff options
author | jennyz <jennyz@chromium.org> | 2016-03-02 12:15:52 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-03-02 20:17:16 +0000 |
commit | bd23674643e0993e443ef785e80b9ad2e3e9adf4 (patch) | |
tree | ceacaa531bf0eee1923686dcf5c6b74d5ecdee99 /extensions/shell | |
parent | 66a4306ee83b007997120be98638487a617938d8 (diff) | |
download | chromium_src-bd23674643e0993e443ef785e80b9ad2e3e9adf4.zip chromium_src-bd23674643e0993e443ef785e80b9ad2e3e9adf4.tar.gz chromium_src-bd23674643e0993e443ef785e80b9ad2e3e9adf4.tar.bz2 |
Persist the user's active audio device choice across chromeos session and reboots.
This cl added a new attribute to device's active state settings to describe if the device is made active by user's selection or by automatic priority selection. The device made active by user has a higher priority than the device made active by priority.
With the stable device id, the active device selection rule is different than before, which only select the active device by its priority. Please see the details in the following document.
https://docs.google.com/a/google.com/document/d/1zmSeM956Njh_9ZdLqyld-NTOpJyXVIfzv8DvQ1Xcksw/edit?usp=sharing
BUG=308143
TBR=stevenjb,rkc,derat
Review URL: https://codereview.chromium.org/1746843002
Cr-Commit-Position: refs/heads/master@{#378812}
Diffstat (limited to 'extensions/shell')
-rw-r--r-- | extensions/shell/browser/shell_audio_controller_chromeos.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/extensions/shell/browser/shell_audio_controller_chromeos.cc b/extensions/shell/browser/shell_audio_controller_chromeos.cc index 19e34ce2..1e89065 100644 --- a/extensions/shell/browser/shell_audio_controller_chromeos.cc +++ b/extensions/shell/browser/shell_audio_controller_chromeos.cc @@ -78,13 +78,15 @@ void ShellAudioController::ActivateDevices() { const chromeos::AudioDevice* device = GetDevice(devices, best_input); DCHECK(device); VLOG(1) << "Activating input device: " << device->ToString(); - handler->SwitchToDevice(*device, true); + handler->SwitchToDevice(*device, true, + chromeos::CrasAudioHandler::ACTIVATE_BY_USER); } if (best_output && best_output != handler->GetPrimaryActiveOutputNode()) { const chromeos::AudioDevice* device = GetDevice(devices, best_output); DCHECK(device); VLOG(1) << "Activating output device: " << device->ToString(); - handler->SwitchToDevice(*device, true); + handler->SwitchToDevice(*device, true, + chromeos::CrasAudioHandler::ACTIVATE_BY_USER); } } |