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