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 #ifndef CHROME_BROWSER_UI_ASH_VOLUME_CONTROLLER_CHROMEOS_H_ | 5 #ifndef CHROME_BROWSER_UI_ASH_VOLUME_CONTROLLER_CHROMEOS_H_ |
6 #define CHROME_BROWSER_UI_ASH_VOLUME_CONTROLLER_CHROMEOS_H_ | 6 #define CHROME_BROWSER_UI_ASH_VOLUME_CONTROLLER_CHROMEOS_H_ |
7 | 7 |
8 #include "ash/volume_control_delegate.h" | 8 #include "ash/volume_control_delegate.h" |
9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
10 #include "chromeos/audio/cras_audio_handler.h" | 10 #include "chromeos/audio/cras_audio_handler.h" |
11 | 11 |
12 // A class which controls volume when F8-10 or a multimedia key for volume is | 12 // A class which controls volume when F8-10 or a multimedia key for volume is |
13 // pressed. | 13 // pressed. |
14 class VolumeController : public ash::VolumeControlDelegate, | 14 class VolumeController : public ash::VolumeControlDelegate, |
15 public chromeos::CrasAudioHandler::AudioObserver { | 15 public chromeos::CrasAudioHandler::AudioObserver { |
16 public: | 16 public: |
17 VolumeController(); | 17 VolumeController(); |
18 ~VolumeController() override; | 18 ~VolumeController() override; |
19 | 19 |
20 // Overridden from ash::VolumeControlDelegate: | 20 // Overridden from ash::VolumeControlDelegate: |
21 void HandleVolumeMute(const ui::Accelerator& accelerator) override; | 21 void HandleVolumeMute(const ui::Accelerator& accelerator) override; |
22 void HandleVolumeDown(const ui::Accelerator& accelerator) override; | 22 void HandleVolumeDown(const ui::Accelerator& accelerator) override; |
23 void HandleVolumeUp(const ui::Accelerator& accelerator) override; | 23 void HandleVolumeUp(const ui::Accelerator& accelerator) override; |
24 | 24 |
25 // Overridden from chromeos::CrasAudioHandler::AudioObserver. | 25 // Overridden from chromeos::CrasAudioHandler::AudioObserver. |
26 void OnOutputNodeVolumeChanged(uint64_t node_id, int volume) override; | 26 void OnOutputNodeVolumeChanged(uint64_t node_id, int volume) override; |
27 void OnOutputMuteChanged(bool mute_on) override; | 27 void OnOutputMuteChanged(bool mute_on, bool system_adjust) override; |
28 | 28 |
29 private: | 29 private: |
30 | 30 |
31 DISALLOW_COPY_AND_ASSIGN(VolumeController); | 31 DISALLOW_COPY_AND_ASSIGN(VolumeController); |
32 }; | 32 }; |
33 | 33 |
34 #endif // CHROME_BROWSER_UI_ASH_VOLUME_CONTROLLER_CHROMEOS_H_ | 34 #endif // CHROME_BROWSER_UI_ASH_VOLUME_CONTROLLER_CHROMEOS_H_ |
OLD | NEW |