diff options
author | yusukes@chromium.org <yusukes@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-01-18 04:12:14 +0000 |
---|---|---|
committer | yusukes@chromium.org <yusukes@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-01-18 04:12:14 +0000 |
commit | fb9a35593b87e79a08cbcfa8105189b54c9f2adf (patch) | |
tree | b38a21db7f41c1570e90297f5198908ebab37db8 /ash/caps_lock_delegate.h | |
parent | 80b64ea5a60284fcdc509a99c83bc889e27db28b (diff) | |
download | chromium_src-fb9a35593b87e79a08cbcfa8105189b54c9f2adf.zip chromium_src-fb9a35593b87e79a08cbcfa8105189b54c9f2adf.tar.gz chromium_src-fb9a35593b87e79a08cbcfa8105189b54c9f2adf.tar.bz2 |
Handle Caps Lock short cut (Shift+Search) in ash [part 1 of 2].
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.
Part 2 of 2: https://chromiumcodereview.appspot.com/9225004/
BUG=110129
TEST=ran aura_shell_unittests
Review URL: http://codereview.chromium.org/9242003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@118035 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash/caps_lock_delegate.h')
-rw-r--r-- | ash/caps_lock_delegate.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/ash/caps_lock_delegate.h b/ash/caps_lock_delegate.h new file mode 100644 index 0000000..dd843e7 --- /dev/null +++ b/ash/caps_lock_delegate.h @@ -0,0 +1,22 @@ +// 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_CAPS_LOCK_DELEGATE_H_ +#define ASH_CAPS_LOCK_DELEGATE_H_ +#pragma once + +namespace ash { + +// Delegate for toggling Caps Lock. +class CapsLockDelegate { + public: + virtual ~CapsLockDelegate() {} + + // A derived class should do either of the following: 1) toggle Caps Lock and + // return true, or 2) do nothing and return false (see crosbug.com/110127). + virtual bool HandleToggleCapsLock() = 0; +}; +} // namespace ash + +#endif // ASH_CAPS_LOCK_DELEGATE_H_ |