Index: chromeos/ime/xkeyboard.h |
diff --git a/chromeos/ime/xkeyboard.h b/chromeos/ime/xkeyboard.h |
index b07e4f44ba3d8c4043f0872e2ab06b3021de4a2f..ad2cbc77d08d2627effa38ae943dd32289d1e9eb 100644 |
--- a/chromeos/ime/xkeyboard.h |
+++ b/chromeos/ime/xkeyboard.h |
@@ -36,8 +36,18 @@ class InputMethodUtil; |
class CHROMEOS_EXPORT XKeyboard { |
public: |
+ class Observer { |
+ public: |
+ // Called when the caps lock state has changed. |
+ virtual void OnCapsLockChanged(bool enabled) = 0; |
+ }; |
+ |
virtual ~XKeyboard() {} |
+ // Adds/removes observer. |
+ virtual void AddObserver(Observer* observer) = 0; |
+ virtual void RemoveObserver(Observer* observer) = 0; |
+ |
// Sets the current keyboard layout to |layout_name|. This function does not |
// change the current mapping of the modifier keys. Returns true on success. |
virtual bool SetCurrentKeyboardLayoutByName( |