Index: ash/test/volume_control_delegate_stub.h |
diff --git a/ash/test/volume_control_delegate_stub.h b/ash/test/volume_control_delegate_stub.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..4f080c44a683035f3db23b36a99fe8821d78f28a |
--- /dev/null |
+++ b/ash/test/volume_control_delegate_stub.h |
@@ -0,0 +1,51 @@ |
+// 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.
|
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef ASH_TEST_VOLUME_CONTROL_DELEGATE_STUB_H_ |
+#define ASH_TEST_VOLUME_CONTROL_DELEGATE_STUB_H_ |
+ |
+#include "ash/volume_control_delegate.h" |
+#include "ui/base/accelerators/accelerator.h" |
+ |
+namespace ash { |
+ |
+class VolumeControlDelegateStub : public ash::VolumeControlDelegate { |
+ public: |
+ explicit VolumeControlDelegateStub(bool consume); |
+ virtual ~VolumeControlDelegateStub(); |
+ |
+ 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(VolumeControlDelegateStub); |
+}; |
+ |
+} // namespace ash |
+ |
+#endif // ASH_TEST_VOLUME_CONTROL_DELEGATE_STUB_H_ |