Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright (c) 2014 The Chromium Authors. All rights reserved. | |
|
flackr
2014/04/29 21:43:54
Copyright style no longer has the (c): http://www.
bruthig
2014/04/30 14:04:45
Done.
| |
| 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_VOLUME_CONTROL_DELEGATE_STUB_H_ | |
| 6 #define ASH_TEST_VOLUME_CONTROL_DELEGATE_STUB_H_ | |
| 7 | |
| 8 #include "ash/volume_control_delegate.h" | |
| 9 #include "ui/base/accelerators/accelerator.h" | |
| 10 | |
| 11 namespace ash { | |
| 12 | |
| 13 class VolumeControlDelegateStub : public ash::VolumeControlDelegate { | |
| 14 public: | |
| 15 explicit VolumeControlDelegateStub(bool consume); | |
| 16 virtual ~VolumeControlDelegateStub(); | |
| 17 | |
| 18 int handle_volume_mute_count() const { | |
| 19 return handle_volume_mute_count_; | |
| 20 } | |
| 21 | |
| 22 int handle_volume_down_count() const { | |
| 23 return handle_volume_down_count_; | |
| 24 } | |
| 25 | |
| 26 int handle_volume_up_count() const { | |
| 27 return handle_volume_up_count_; | |
| 28 } | |
| 29 | |
| 30 const ui::Accelerator& last_accelerator() const { | |
| 31 return last_accelerator_; | |
| 32 } | |
| 33 | |
| 34 // ash::VolumeControlDelegate: | |
| 35 virtual bool HandleVolumeMute(const ui::Accelerator& accelerator) OVERRIDE; | |
| 36 virtual bool HandleVolumeDown(const ui::Accelerator& accelerator) OVERRIDE; | |
| 37 virtual bool HandleVolumeUp(const ui::Accelerator& accelerator) OVERRIDE; | |
| 38 | |
| 39 private: | |
| 40 bool consume_; | |
| 41 int handle_volume_mute_count_; | |
| 42 int handle_volume_down_count_; | |
| 43 int handle_volume_up_count_; | |
| 44 ui::Accelerator last_accelerator_; | |
| 45 | |
| 46 DISALLOW_COPY_AND_ASSIGN(VolumeControlDelegateStub); | |
| 47 }; | |
| 48 | |
| 49 } // namespace ash | |
| 50 | |
| 51 #endif // ASH_TEST_VOLUME_CONTROL_DELEGATE_STUB_H_ | |
| OLD | NEW |