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

Unified Diff: ash/test/volume_control_delegate_stub.cc

Issue 251193005: Enabled volume buttons when TouchView is active (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed Rob's comments from patch set 3 Created 6 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: ash/test/volume_control_delegate_stub.cc
diff --git a/ash/test/volume_control_delegate_stub.cc b/ash/test/volume_control_delegate_stub.cc
new file mode 100644
index 0000000000000000000000000000000000000000..0d708f1d21d7fa3331f8a60f04f3d8b5ac15f46f
--- /dev/null
+++ b/ash/test/volume_control_delegate_stub.cc
@@ -0,0 +1,39 @@
+// Copyright 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.
+
+#include "ash/test/volume_control_delegate_stub.h"
+
+namespace ash {
+
+VolumeControlDelegateStub::VolumeControlDelegateStub(bool consume)
+ : consume_(consume),
+ handle_volume_mute_count_(0),
+ handle_volume_down_count_(0),
+ handle_volume_up_count_(0) {
+}
+
+VolumeControlDelegateStub::~VolumeControlDelegateStub() {}
flackr 2014/04/30 14:27:44 nit: We tend to only use {} for empty inlined func
bruthig 2014/04/30 15:36:16 Done.
+
+bool VolumeControlDelegateStub::HandleVolumeMute(
+ const ui::Accelerator& accelerator) {
+ ++handle_volume_mute_count_;
+ last_accelerator_ = accelerator;
+ return consume_;
+}
+
+bool VolumeControlDelegateStub::HandleVolumeDown(
+ const ui::Accelerator& accelerator) {
+ ++handle_volume_down_count_;
+ last_accelerator_ = accelerator;
+ return consume_;
+}
+
+bool VolumeControlDelegateStub::HandleVolumeUp(
+ const ui::Accelerator& accelerator) {
+ ++handle_volume_up_count_;
+ last_accelerator_ = accelerator;
+ return consume_;
+}
+
+} // namespace ash

Powered by Google App Engine
This is Rietveld 408576698