Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(45)

Side by Side Diff: ash/test/test_volume_control_delegate.h

Issue 2182443005: Moves TestVolumeControlDelegate to ash/common/test (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
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.
4
5 #ifndef ASH_TEST_TEST_VOLUME_CONTROL_DELEGATE_H_
6 #define ASH_TEST_TEST_VOLUME_CONTROL_DELEGATE_H_
7
8 #include "ash/common/system/volume_control_delegate.h"
9 #include "base/macros.h"
10 #include "ui/base/accelerators/accelerator.h"
11
12 namespace ash {
13
14 // A simple test double for a VolumeControlDelegate
15 // Will count the number of times the HandleVolumeMute, HandleVolumeDown and
16 // HandleVolumeUp methods are invoked.
17 class TestVolumeControlDelegate : public ash::VolumeControlDelegate {
18 public:
19 TestVolumeControlDelegate();
20 ~TestVolumeControlDelegate() override;
21
22 int handle_volume_mute_count() const { return handle_volume_mute_count_; }
23
24 int handle_volume_down_count() const { return handle_volume_down_count_; }
25
26 int handle_volume_up_count() const { return handle_volume_up_count_; }
27
28 const ui::Accelerator& last_accelerator() const { return last_accelerator_; }
29
30 // ash::VolumeControlDelegate:
31 void HandleVolumeMute(const ui::Accelerator& accelerator) override;
32 void HandleVolumeDown(const ui::Accelerator& accelerator) override;
33 void HandleVolumeUp(const ui::Accelerator& accelerator) override;
34
35 private:
36 int handle_volume_mute_count_;
37 int handle_volume_down_count_;
38 int handle_volume_up_count_;
39 ui::Accelerator last_accelerator_;
40
41 DISALLOW_COPY_AND_ASSIGN(TestVolumeControlDelegate);
42 };
43
44 } // namespace ash
45
46 #endif // ASH_TEST_TEST_VOLUME_CONTROL_DELEGATE_H_
OLDNEW
« no previous file with comments | « ash/common/test/test_volume_control_delegate.cc ('k') | ash/test/test_volume_control_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698