| Index: chromeos/ime/fake_ime_keyboard.cc
|
| diff --git a/chromeos/ime/fake_ime_keyboard.cc b/chromeos/ime/fake_ime_keyboard.cc
|
| index 930565f242c733a59da98aae9cb7752e9f480237..d4bd0e0bb6f1813e2100042bc02e0bde915e2fd5 100644
|
| --- a/chromeos/ime/fake_ime_keyboard.cc
|
| +++ b/chromeos/ime/fake_ime_keyboard.cc
|
| @@ -9,26 +9,25 @@
|
|
|
| FakeImeKeyboard::FakeImeKeyboard()
|
| : set_current_keyboard_layout_by_name_count_(0),
|
| + caps_lock_is_enabled_(false),
|
| auto_repeat_is_enabled_(false) {
|
| }
|
|
|
| FakeImeKeyboard::~FakeImeKeyboard() {
|
| }
|
|
|
| +void FakeImeKeyboard::AddObserver(Observer* observer) {
|
| + observers_.AddObserver(observer);
|
| +}
|
| +
|
| +void FakeImeKeyboard::RemoveObserver(Observer* observer) {
|
| + observers_.RemoveObserver(observer);
|
| +}
|
| +
|
| bool FakeImeKeyboard::SetCurrentKeyboardLayoutByName(
|
| const std::string& layout_name) {
|
| ++set_current_keyboard_layout_by_name_count_;
|
| last_layout_ = layout_name;
|
| - return true;
|
| -}
|
| -
|
| -bool FakeImeKeyboard::SetAutoRepeatRate(const AutoRepeatRate& rate) {
|
| - last_auto_repeat_rate_ = rate;
|
| - return true;
|
| -}
|
| -
|
| -bool FakeImeKeyboard::SetAutoRepeatEnabled(bool enabled) {
|
| - auto_repeat_is_enabled_ = enabled;
|
| return true;
|
| }
|
|
|
| @@ -42,6 +41,19 @@
|
| void FakeImeKeyboard::DisableNumLock() {
|
| }
|
|
|
| +void FakeImeKeyboard::SetCapsLockEnabled(bool enable_caps_lock) {
|
| + bool old_state = caps_lock_is_enabled_;
|
| + caps_lock_is_enabled_ = enable_caps_lock;
|
| + if (old_state != enable_caps_lock) {
|
| + FOR_EACH_OBSERVER(ImeKeyboard::Observer, observers_,
|
| + OnCapsLockChanged(enable_caps_lock));
|
| + }
|
| +}
|
| +
|
| +bool FakeImeKeyboard::CapsLockIsEnabled() {
|
| + return caps_lock_is_enabled_;
|
| +}
|
| +
|
| bool FakeImeKeyboard::IsISOLevel5ShiftAvailable() const {
|
| return false;
|
| }
|
| @@ -50,5 +62,15 @@
|
| return false;
|
| }
|
|
|
| +bool FakeImeKeyboard::SetAutoRepeatEnabled(bool enabled) {
|
| + auto_repeat_is_enabled_ = enabled;
|
| + return true;
|
| +}
|
| +
|
| +bool FakeImeKeyboard::SetAutoRepeatRate(const AutoRepeatRate& rate) {
|
| + last_auto_repeat_rate_ = rate;
|
| + return true;
|
| +}
|
| +
|
| } // namespace input_method
|
| } // namespace chromeos
|
|
|