Chromium Code Reviews| Index: chromeos/ime/ime_keyboard_ozone.cc |
| diff --git a/chromeos/ime/ime_keyboard_ozone.cc b/chromeos/ime/ime_keyboard_ozone.cc |
| index 95107988c9b0c2dba80306dfe35115659d4c5f2b..38ccf45655239ddbd6bc933c970e8786884745c9 100644 |
| --- a/chromeos/ime/ime_keyboard_ozone.cc |
| +++ b/chromeos/ime/ime_keyboard_ozone.cc |
| @@ -2,16 +2,59 @@ |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| -#include "chromeos/ime/fake_ime_keyboard.h" |
| -#include "chromeos/ime/ime_keyboard.h" |
| +#include "chromeos/ime/ime_keyboard_ozone.h" |
| namespace chromeos { |
| namespace input_method { |
| -// static |
| -ImeKeyboard* ImeKeyboard::Create() { |
| - return new FakeImeKeyboard; |
| + |
| +ImeKeyboardOzone::ImeKeyboardOzone() { |
| +} |
| + |
| + |
| +ImeKeyboardOzone::~ImeKeyboardOzone() { |
| +} |
| + |
| +bool ImeKeyboardOzone::SetCurrentKeyboardLayoutByName( |
| + const std::string& layout_name) { |
| + // Call SetKeyMapping here. |
| + // TODO: parse out layout name and variation. |
| + last_layout_ = layout_name; |
| + return true; |
| +} |
| + |
| +bool ImeKeyboardOzone::ReapplyCurrentKeyboardLayout() { |
| + return SetCurrentKeyboardLayoutByName(last_layout_); |
| } |
| +void ImeKeyboardOzone::SetCapsLockEnabled(bool enable_caps_lock) { |
| + // Call SetModifierStates here. |
| + ImeKeyboard::SetCapsLockEnabled(enable_caps_lock); |
| +} |
| + |
| +bool ImeKeyboardOzone::CapsLockIsEnabled() { |
| + // Call getModifierStates here. |
| + return false; |
|
Shu Chen
2014/11/04 06:17:08
why not return ImeKeyboard::CapsLockIsEnabled(); ?
FengYuan
2014/11/04 07:11:19
It's a placeholder, we should call the interface i
Shu Chen
2014/11/04 07:22:42
Set/Get inconsistency would potentially break caps
FengYuan
2014/11/04 07:29:00
Done.
|
| +} |
| + |
| +void ImeKeyboardOzone::ReapplyCurrentModifierLockStatus() { |
| + // call SetModifierStates here. |
| +} |
| + |
| +void ImeKeyboardOzone::DisableNumLock() { |
| + SetCapsLockEnabled(caps_lock_is_enabled_); |
|
Shu Chen
2014/11/04 06:17:08
using SetCapsLockEnabled() to DisableNumLock() is
FengYuan
2014/11/04 07:11:19
Done.
|
| +} |
| + |
| +bool ImeKeyboardOzone::SetAutoRepeatRate(const AutoRepeatRate& rate) { |
| + return true; |
| +} |
| + |
| +bool ImeKeyboardOzone::SetAutoRepeatEnabled(bool enabled) { |
| + return true; |
| +} |
| + |
| +// static |
| +ImeKeyboard* ImeKeyboard::Create() { return new ImeKeyboardOzone(); } |
| + |
| } // namespace input_method |
| } // namespace chromeos |