Chromium Code Reviews| Index: ash/test/dummy_volume_control_delegate.h |
| diff --git a/ash/test/dummy_volume_control_delegate.h b/ash/test/dummy_volume_control_delegate.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..1f0f88e6b6cd09deef8c571c7619c548922d8be7 |
| --- /dev/null |
| +++ b/ash/test/dummy_volume_control_delegate.h |
| @@ -0,0 +1,51 @@ |
| +// Copyright (c) 2014 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef ASH_TEST_DUMMY_VOLUME_CONTROL_DELEGATE_H_ |
| +#define ASH_TEST_DUMMY_VOLUME_CONTROL_DELEGATE_H_ |
| + |
| +#include "ash/volume_control_delegate.h" |
| +#include "ui/base/accelerators/accelerator.h" |
| + |
| +namespace ash { |
| + |
| +class DummyVolumeControlDelegate : public ash::VolumeControlDelegate { |
|
jonross
2014/04/29 17:32:09
Not a big fan of calling this a 'Dummy'
Really fe
|
| + public: |
| + explicit DummyVolumeControlDelegate(bool consume); |
| + virtual ~DummyVolumeControlDelegate(); |
| + |
| + int handle_volume_mute_count() const { |
| + return handle_volume_mute_count_; |
| + } |
| + |
| + int handle_volume_down_count() const { |
| + return handle_volume_down_count_; |
| + } |
| + |
| + int handle_volume_up_count() const { |
| + return handle_volume_up_count_; |
| + } |
| + |
| + const ui::Accelerator& last_accelerator() const { |
| + return last_accelerator_; |
| + } |
| + |
| + // ash::VolumeControlDelegate: |
| + virtual bool HandleVolumeMute(const ui::Accelerator& accelerator) OVERRIDE; |
| + virtual bool HandleVolumeDown(const ui::Accelerator& accelerator) OVERRIDE; |
| + virtual bool HandleVolumeUp(const ui::Accelerator& accelerator) OVERRIDE; |
| + |
| + private: |
| + bool consume_; |
| + int handle_volume_mute_count_; |
| + int handle_volume_down_count_; |
| + int handle_volume_up_count_; |
| + ui::Accelerator last_accelerator_; |
| + |
| + DISALLOW_COPY_AND_ASSIGN(DummyVolumeControlDelegate); |
| +}; |
| + |
| +} // namespace ash |
| + |
| +#endif // ASH_TEST_DUMMY_VOLUME_CONTROL_DELEGATE_H_ |