| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #include "chromeos/ime/fake_ime_keyboard.h" | 5 #include "chromeos/ime/ime_keyboard_ozone.h" |
| 6 #include "chromeos/ime/ime_keyboard.h" | |
| 7 | 6 |
| 8 namespace chromeos { | 7 namespace chromeos { |
| 9 namespace input_method { | 8 namespace input_method { |
| 10 | 9 |
| 11 // static | 10 |
| 12 ImeKeyboard* ImeKeyboard::Create() { | 11 ImeKeyboardOzone::ImeKeyboardOzone() |
| 13 return new FakeImeKeyboard; | 12 : set_current_keyboard_layout_by_name_count_(0), |
| 13 caps_lock_is_enabled_(false), |
| 14 auto_repeat_is_enabled_(false) { |
| 15 } |
| 16 |
| 17 |
| 18 ImeKeyboardOzone::~ImeKeyboardOzone() { |
| 19 } |
| 20 |
| 21 bool ImeKeyboardOzone::SetCurrentKeyboardLayoutByName( |
| 22 const std::string& layout_name) { |
| 23 // Call SetKeyMapping here. |
| 24 // TODO: parse out layout name and variation. |
| 25 last_layout_ = layout_name; |
| 26 return true; |
| 27 } |
| 28 |
| 29 void ImeKeyboardOzone::ReapplyCurrentKeyboardLayout() { |
| 30 SetCurrentKeyboardLayoutByName(last_layout_); |
| 31 } |
| 32 |
| 33 void ImeKeyboardOzone::SetCapsLockEnabled(bool enable_caps_lock) { |
| 34 // Call SetModifierStates here. |
| 35 ImeKeyboard::SetCapsLockEnabled(enable_caps_lock); |
| 36 } |
| 37 |
| 38 bool ImeKeyboardOzone::CapsLockIsEnabled() { |
| 39 // Call getModifierStates here. |
| 40 return false; |
| 41 } |
| 42 |
| 43 void ImeKeyboardOzone::ReapplyCurrentModifierLockStatus() { |
| 44 // call SetModifierStates here. |
| 45 } |
| 46 |
| 47 void ImeKeyboardOzone::DisableNumLock() { |
| 48 SetCapsLockEnabled(caps_lock_is_enabled_); |
| 49 } |
| 50 |
| 51 bool ImeKeyboardOzone::SetAutoRepeatRate(const AutoRepeatRate& rate) { |
| 52 return true; |
| 53 } |
| 54 |
| 55 bool ImeKeyboardOzone::SetAutoRepeatEnabled(bool enabled) { |
| 56 return true; |
| 14 } | 57 } |
| 15 | 58 |
| 16 } // namespace input_method | 59 } // namespace input_method |
| 17 } // namespace chromeos | 60 } // namespace chromeos |
| OLD | NEW |