summaryrefslogtreecommitdiffstats
path: root/ash/volume_control_delegate.h
diff options
context:
space:
mode:
authoryusukes@google.com <yusukes@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2012-02-06 19:24:50 +0000
committeryusukes@google.com <yusukes@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2012-02-06 19:24:50 +0000
commit16f05f4ffb9994f71c832704f09e1d5165731c99 (patch)
tree8b22cf06fe458b81accc7d4cb8a075f6595237d9 /ash/volume_control_delegate.h
parent86b1dc18859817e039361c623e3b0e4074593367 (diff)
downloadchromium_src-16f05f4ffb9994f71c832704f09e1d5165731c99.zip
chromium_src-16f05f4ffb9994f71c832704f09e1d5165731c99.tar.gz
chromium_src-16f05f4ffb9994f71c832704f09e1d5165731c99.tar.bz2
Handle F8, F9, and F10 (volume keys) in ash [part 1 of 3].
Currently it's handled in chrome/browser/chromeos/system_key_event_listener.cc by checking the X event loop directly, but for Aura, it'd be better to remove the X dependency by moving the code to ash/accelerators/ since any class except aura::RootWindowHost should not handle an X event directly. BUG=110407 TEST=ran aura_shell_unittests Review URL: https://chromiumcodereview.appspot.com/9301021 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@120584 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash/volume_control_delegate.h')
-rw-r--r--ash/volume_control_delegate.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/ash/volume_control_delegate.h b/ash/volume_control_delegate.h
new file mode 100644
index 0000000..46b3cf3
--- /dev/null
+++ b/ash/volume_control_delegate.h
@@ -0,0 +1,27 @@
+// Copyright (c) 2012 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_VOLUME_CONTROL_DELEGATE_H_
+#define ASH_VOLUME_CONTROL_DELEGATE_H_
+#pragma once
+
+namespace ui {
+class Accelerator;
+} // namespace ui
+
+namespace ash {
+
+// Delegate for controlling the volume.
+class VolumeControlDelegate {
+ public:
+ virtual ~VolumeControlDelegate() {}
+
+ virtual bool HandleVolumeMute(const ui::Accelerator& accelerator) = 0;
+ virtual bool HandleVolumeDown(const ui::Accelerator& accelerator) = 0;
+ virtual bool HandleVolumeUp(const ui::Accelerator& accelerator) = 0;
+};
+
+} // namespace ash
+
+#endif // ASH_VOLUME_CONTROL_DELEGATE_H_