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

Unified Diff: ash/caps_lock_delegate.h

Issue 10878058: Move functions for controlling Caps Lock to CapsLockDelegate from SystemTrayDelegate. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: modify AcceleratorControllerTest Created 8 years, 4 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
« no previous file with comments | « ash/ash.gyp ('k') | ash/caps_lock_delegate_stub.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/caps_lock_delegate.h
diff --git a/ash/caps_lock_delegate.h b/ash/caps_lock_delegate.h
index 158457dba54bb7060b7249bd4c5f9d8d0d133368..b792f77c1b5326e589af2fc540f606e9fd9a23eb 100644
--- a/ash/caps_lock_delegate.h
+++ b/ash/caps_lock_delegate.h
@@ -5,17 +5,25 @@
#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 the caps lock is enabled.
Daniel Erat 2012/08/27 17:26:57 nit: s/the caps lock/caps lock/
mazda 2012/08/27 21:07:49 Done.
+ virtual bool IsCapsLockEnabled() const = 0;
+
+ // Sets the caps lock state to |enabled|.
+ virtual void SetCapsLockEnabled(bool enabled) = 0;
Daniel Erat 2012/08/27 17:26:57 document that this method and ToggleCapsLock() tog
mazda 2012/08/27 21:07:49 Currently pressing caps lock key is handled separa
+
+ // Toggles the caps lock state.
+ virtual void ToggleCapsLock() = 0;
};
+
} // namespace ash
#endif // ASH_CAPS_LOCK_DELEGATE_H_
« no previous file with comments | « ash/ash.gyp ('k') | ash/caps_lock_delegate_stub.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698