Added llvm into exceptions as we can't add README.chromium into 3rd party repository
[chromium-blink-merge.git] / ash / test / test_volume_control_delegate.h
blob69bf5d6d6d29bcbd1b6d402e2bdcf5398eeabfae
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
3 // found in the LICENSE file.
5 #ifndef ASH_TEST_TEST_VOLUME_CONTROL_DELEGATE_H_
6 #define ASH_TEST_TEST_VOLUME_CONTROL_DELEGATE_H_
8 #include "ash/volume_control_delegate.h"
9 #include "ui/base/accelerators/accelerator.h"
11 namespace ash {
13 // A simple test double for a VolumeControlDelegate
14 // Will count the number of times the HandleVolumeMute, HandleVolumeDown and
15 // HandleVolumeUp methods are invoked.
16 class TestVolumeControlDelegate : public ash::VolumeControlDelegate {
17 public:
18 TestVolumeControlDelegate();
19 ~TestVolumeControlDelegate() override;
21 int handle_volume_mute_count() const {
22 return handle_volume_mute_count_;
25 int handle_volume_down_count() const {
26 return handle_volume_down_count_;
29 int handle_volume_up_count() const {
30 return handle_volume_up_count_;
33 const ui::Accelerator& last_accelerator() const {
34 return last_accelerator_;
37 // ash::VolumeControlDelegate:
38 void HandleVolumeMute(const ui::Accelerator& accelerator) override;
39 void HandleVolumeDown(const ui::Accelerator& accelerator) override;
40 void HandleVolumeUp(const ui::Accelerator& accelerator) override;
42 private:
43 int handle_volume_mute_count_;
44 int handle_volume_down_count_;
45 int handle_volume_up_count_;
46 ui::Accelerator last_accelerator_;
48 DISALLOW_COPY_AND_ASSIGN(TestVolumeControlDelegate);
51 } // namespace ash
53 #endif // ASH_TEST_TEST_VOLUME_CONTROL_DELEGATE_H_