| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "extensions/shell/browser/shell_audio_controller_chromeos.h" | 5 #include "extensions/shell/browser/shell_audio_controller_chromeos.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "chromeos/audio/audio_device.h" | 9 #include "chromeos/audio/audio_device.h" |
| 10 | 10 |
| (...skipping 21 matching lines...) Expand all Loading... |
| 32 } | 32 } |
| 33 | 33 |
| 34 ShellAudioController::~ShellAudioController() { | 34 ShellAudioController::~ShellAudioController() { |
| 35 chromeos::CrasAudioHandler::Get()->RemoveAudioObserver(this); | 35 chromeos::CrasAudioHandler::Get()->RemoveAudioObserver(this); |
| 36 } | 36 } |
| 37 | 37 |
| 38 void ShellAudioController::OnOutputNodeVolumeChanged(uint64_t /* node_id */, | 38 void ShellAudioController::OnOutputNodeVolumeChanged(uint64_t /* node_id */, |
| 39 int /* volume */) { | 39 int /* volume */) { |
| 40 } | 40 } |
| 41 | 41 |
| 42 void ShellAudioController::OnOutputMuteChanged(bool /* mute_on */) { | 42 void ShellAudioController::OnOutputMuteChanged(bool /* mute_on */, |
| 43 } | 43 bool /* system_adjust */) {} |
| 44 | 44 |
| 45 void ShellAudioController::OnInputNodeGainChanged(uint64_t /* node_id */, | 45 void ShellAudioController::OnInputNodeGainChanged(uint64_t /* node_id */, |
| 46 int /* gain */) { | 46 int /* gain */) { |
| 47 } | 47 } |
| 48 | 48 |
| 49 void ShellAudioController::OnInputMuteChanged(bool /* mute_on */) { | 49 void ShellAudioController::OnInputMuteChanged(bool /* mute_on */) { |
| 50 } | 50 } |
| 51 | 51 |
| 52 void ShellAudioController::OnAudioNodesChanged() { | 52 void ShellAudioController::OnAudioNodesChanged() { |
| 53 VLOG(1) << "Audio nodes changed"; | 53 VLOG(1) << "Audio nodes changed"; |
| (...skipping 28 matching lines...) Expand all Loading... |
| 82 } | 82 } |
| 83 if (best_output && best_output != handler->GetPrimaryActiveOutputNode()) { | 83 if (best_output && best_output != handler->GetPrimaryActiveOutputNode()) { |
| 84 const chromeos::AudioDevice* device = GetDevice(devices, best_output); | 84 const chromeos::AudioDevice* device = GetDevice(devices, best_output); |
| 85 DCHECK(device); | 85 DCHECK(device); |
| 86 VLOG(1) << "Activating output device: " << device->ToString(); | 86 VLOG(1) << "Activating output device: " << device->ToString(); |
| 87 handler->SwitchToDevice(*device, true); | 87 handler->SwitchToDevice(*device, true); |
| 88 } | 88 } |
| 89 } | 89 } |
| 90 | 90 |
| 91 } // namespace extensions | 91 } // namespace extensions |
| OLD | NEW |