OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "chrome/browser/ui/ash/volume_controller_chromeos.h" | 5 #include "chrome/browser/ui/ash/volume_controller_chromeos.h" |
6 | 6 |
7 #include "ash/ash_switches.h" | 7 #include "ash/ash_switches.h" |
8 #include "ash/audio/sounds.h" | 8 #include "ash/audio/sounds.h" |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "chrome/browser/browser_process.h" | 10 #include "chrome/browser/browser_process.h" |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
85 play_sound = true; | 85 play_sound = true; |
86 } else { | 86 } else { |
87 play_sound = audio_handler->GetOutputVolumePercent() != 100; | 87 play_sound = audio_handler->GetOutputVolumePercent() != 100; |
88 audio_handler->AdjustOutputVolumeByPercent(kStepPercentage); | 88 audio_handler->AdjustOutputVolumeByPercent(kStepPercentage); |
89 } | 89 } |
90 | 90 |
91 if (play_sound) | 91 if (play_sound) |
92 PlayVolumeAdjustSound(); | 92 PlayVolumeAdjustSound(); |
93 } | 93 } |
94 | 94 |
95 void VolumeController::OnOutputVolumeChanged() { | 95 void VolumeController::OnOutputNodeVolumeChanged(uint64 node_id, |
| 96 double volume) { |
96 CrasAudioHandler* audio_handler = CrasAudioHandler::Get(); | 97 CrasAudioHandler* audio_handler = CrasAudioHandler::Get(); |
97 extensions::DispatchVolumeChangedEvent( | 98 extensions::DispatchVolumeChangedEvent( |
98 audio_handler->GetOutputVolumePercent(), | 99 audio_handler->GetOutputVolumePercent(), |
99 audio_handler->IsOutputMuted()); | 100 audio_handler->IsOutputMuted()); |
100 } | 101 } |
101 | 102 |
102 void VolumeController::OnOutputMuteChanged() { | 103 void VolumeController::OnOutputMuteChanged() { |
103 CrasAudioHandler* audio_handler = CrasAudioHandler::Get(); | 104 CrasAudioHandler* audio_handler = CrasAudioHandler::Get(); |
104 extensions::DispatchVolumeChangedEvent( | 105 extensions::DispatchVolumeChangedEvent( |
105 audio_handler->GetOutputVolumePercent(), | 106 audio_handler->GetOutputVolumePercent(), |
106 audio_handler->IsOutputMuted()); | 107 audio_handler->IsOutputMuted()); |
107 } | 108 } |
OLD | NEW |