| 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/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.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: | 15 public: |
| 16 VolumeController() {} | 16 VolumeController() {} |
| 17 virtual ~VolumeController() {} | 17 virtual ~VolumeController() {} |
| 18 | 18 |
| 19 // Overridden from ash::VolumeControlDelegate: | 19 // Overridden from ash::VolumeControlDelegate: |
| 20 virtual bool HandleVolumeMute(const ui::Accelerator& accelerator) OVERRIDE; | 20 virtual bool HandleVolumeMute(const ui::Accelerator& accelerator) OVERRIDE; |
| 21 virtual bool HandleVolumeDown(const ui::Accelerator& accelerator) OVERRIDE; | 21 virtual bool HandleVolumeDown(const ui::Accelerator& accelerator) OVERRIDE; |
| 22 virtual bool HandleVolumeUp(const ui::Accelerator& accelerator) OVERRIDE; | 22 virtual bool HandleVolumeUp(const ui::Accelerator& accelerator) OVERRIDE; |
| 23 virtual bool IsAudioMuted() const OVERRIDE; |
| 24 virtual void SetAudioMuted(bool muted) OVERRIDE; |
| 25 virtual float GetVolumeLevel() const OVERRIDE; |
| 26 virtual void SetVolumeLevel(float level) OVERRIDE; |
| 23 virtual void SetVolumePercent(double percent) OVERRIDE; | 27 virtual void SetVolumePercent(double percent) OVERRIDE; |
| 24 | 28 |
| 25 private: | 29 private: |
| 26 DISALLOW_COPY_AND_ASSIGN(VolumeController); | 30 DISALLOW_COPY_AND_ASSIGN(VolumeController); |
| 27 }; | 31 }; |
| 28 | 32 |
| 29 #endif // CHROME_BROWSER_UI_ASH_VOLUME_CONTROLLER_CHROMEOS_H_ | 33 #endif // CHROME_BROWSER_UI_ASH_VOLUME_CONTROLLER_CHROMEOS_H_ |
| OLD | NEW |