OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef ASH_CAPS_LOCK_DELEGATE_H_ | 5 #ifndef ASH_CAPS_LOCK_DELEGATE_H_ |
6 #define ASH_CAPS_LOCK_DELEGATE_H_ | 6 #define ASH_CAPS_LOCK_DELEGATE_H_ |
7 | 7 |
8 #include "ash/ash_export.h" | |
9 | |
8 namespace ash { | 10 namespace ash { |
9 | 11 |
10 // Delegate for toggling Caps Lock. | 12 // Delegate for controlling Caps Lock. |
11 class CapsLockDelegate { | 13 class ASH_EXPORT CapsLockDelegate { |
12 public: | 14 public: |
13 virtual ~CapsLockDelegate() {} | 15 virtual ~CapsLockDelegate() {} |
14 | 16 |
15 // A derived class should do either of the following: 1) toggle Caps Lock and | 17 // Returns true if the caps lock is enabled. |
16 // return true, or 2) do nothing and return false (see crosbug.com/110127). | 18 virtual bool IsCapsLockEnabled() = 0; |
tfarina
2012/08/26 20:49:07
can you make this const?
mazda
2012/08/27 16:06:40
Done.
| |
17 virtual bool HandleToggleCapsLock() = 0; | 19 |
20 // Sets the caps lock state to |enabled|. | |
21 virtual void SetCapsLockEnabled(bool enabled) = 0; | |
22 | |
23 // Toggles the caps lock state. | |
24 virtual void ToggleCapsLock() = 0; | |
18 }; | 25 }; |
26 | |
19 } // namespace ash | 27 } // namespace ash |
20 | 28 |
21 #endif // ASH_CAPS_LOCK_DELEGATE_H_ | 29 #endif // ASH_CAPS_LOCK_DELEGATE_H_ |
OLD | NEW |