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