| 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..dd897bdc7f2cea64b25a6a4e9b8c779f221bc89f 100644
|
| --- a/chromeos/ime/ime_keyboard_ozone.cc
|
| +++ b/chromeos/ime/ime_keyboard_ozone.cc
|
| @@ -2,15 +2,71 @@
|
| // 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 {
|
|
|
| +
|
| +ImeKeyboardOzone::ImeKeyboardOzone()
|
| + : set_current_keyboard_layout_by_name_count_(0),
|
| + caps_lock_is_enabled_(false),
|
| + auto_repeat_is_enabled_(false) {
|
| +}
|
| +
|
| +
|
| +ImeKeyboardOzone::~ImeKeyboardOzone() {
|
| +}
|
| +
|
| +bool ImeKeyboardOzone::SetCurrentKeyboardLayoutByName(
|
| + const std::string& layout_name) {
|
| + // Call SetKeyMapping here.
|
| + // TODO: parse out layout name and variation.
|
| + return ImeKeyboard::SetCurrentKeyboardLayoutByName(layout_name);
|
| +}
|
| +
|
| +void ImeKeyboardOzone::ReapplyCurrentKeyboardLayout() {
|
| + 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;
|
| +}
|
| +
|
| +bool ImeKeyboardOzone::IsAltGrAvailable() {
|
| + for (size_t i = 0; i < arraysize(kAltGrLayoutIds); ++i) {
|
| + if (last_layout_ == kAltGrLayoutIds[i])
|
| + return true;
|
| + }
|
| + return false;
|
| +}
|
| +
|
| +void ImeKeyboardOzone::ReapplyCurrentModifierLockStatus() {
|
| + // call SetModifierStates here.
|
| +}
|
| +
|
| +void ImeKeyboardOzone::DisableNumLock() {
|
| + SetCapsLockEnabled(caps_lock_is_enabled_);
|
| +}
|
| +
|
| +bool ImeKeyboardOzone::IsISOLevel5ShiftAvailable() {
|
| + for (size_t i = 0; i < arraysize(kISOLevel5ShiftLayoutIds); ++i) {
|
| + if (last_layout_ == kISOLevel5ShiftLayoutIds[i])
|
| + return true;
|
| + }
|
| + return false;
|
| +}
|
| +
|
| +
|
| // static
|
| ImeKeyboard* ImeKeyboard::Create() {
|
| - return new FakeImeKeyboard;
|
| + return new ImeKeyboardOzone();
|
| }
|
|
|
| } // namespace input_method
|
|
|