diff options
author | mazda@chromium.org <mazda@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-08-28 00:59:59 +0000 |
---|---|---|
committer | mazda@chromium.org <mazda@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-08-28 00:59:59 +0000 |
commit | f4c92b381a0aaba5f36c6f5afdac572bee389b39 (patch) | |
tree | 90d68de6efd62ade78148dfa5b8af5f46a00be32 /ash/caps_lock_delegate.h | |
parent | 76ab62b1527261a8547c59b7c81cf53a2af4b387 (diff) | |
download | chromium_src-f4c92b381a0aaba5f36c6f5afdac572bee389b39.zip chromium_src-f4c92b381a0aaba5f36c6f5afdac572bee389b39.tar.gz chromium_src-f4c92b381a0aaba5f36c6f5afdac572bee389b39.tar.bz2 |
Move functions for controlling Caps Lock to CapsLockDelegate from SystemTrayDelegate.
- Add functions for controlling Caps Lock to CapsLockDelegate
- Move the ownership of CapsLockDelegate to Shell from AcceleratorController
- Add ShellDelegate::CreateCapsLockDelegate
BUG=144474
Review URL: https://chromiumcodereview.appspot.com/10878058
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@153597 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, 17 insertions, 5 deletions
diff --git a/ash/caps_lock_delegate.h b/ash/caps_lock_delegate.h index 158457d..6bd2b69 100644 --- a/ash/caps_lock_delegate.h +++ b/ash/caps_lock_delegate.h @@ -5,17 +5,29 @@ #ifndef ASH_CAPS_LOCK_DELEGATE_H_ #define ASH_CAPS_LOCK_DELEGATE_H_ +#include "ash/ash_export.h" + namespace ash { -// Delegate for toggling Caps Lock. -class CapsLockDelegate { +// Delegate for controlling Caps Lock. +class ASH_EXPORT 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; + // Returns true if caps lock is enabled. + virtual bool IsCapsLockEnabled() const = 0; + + // Sets the caps lock state to |enabled|. + // The state change can occur asynchronously and calling IsCapsLockEnabled + // just after this may return the old state. + virtual void SetCapsLockEnabled(bool enabled) = 0; + + // Toggles the caps lock state. + // The state change can occur asynchronously and calling IsCapsLockEnabled + // just after this may return the old state. + virtual void ToggleCapsLock() = 0; }; + } // namespace ash #endif // ASH_CAPS_LOCK_DELEGATE_H_ |