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 "ui/base/ime/chromeos/ime_keyboard_ozone.h" | 5 #include "ui/base/ime/chromeos/ime_keyboard_ozone.h" |
6 #include "ui/events/ozone/layout/keyboard_layout_engine.h" | 6 #include "ui/events/ozone/layout/keyboard_layout_engine.h" |
7 #include "ui/events/ozone/layout/keyboard_layout_engine_manager.h" | 7 #include "ui/events/ozone/layout/keyboard_layout_engine_manager.h" |
8 | 8 |
9 | 9 |
10 #include "ui/ozone/public/input_controller.h" | 10 #include "ui/ozone/public/input_controller.h" |
(...skipping 17 matching lines...) Expand all Loading... |
28 GetKeyboardLayoutEngine(); | 28 GetKeyboardLayoutEngine(); |
29 keyboard_engine->SetCurrentLayoutByName(layout_name); | 29 keyboard_engine->SetCurrentLayoutByName(layout_name); |
30 return true; | 30 return true; |
31 } | 31 } |
32 | 32 |
33 bool ImeKeyboardOzone::ReapplyCurrentKeyboardLayout() { | 33 bool ImeKeyboardOzone::ReapplyCurrentKeyboardLayout() { |
34 return SetCurrentKeyboardLayoutByName(last_layout_); | 34 return SetCurrentKeyboardLayoutByName(last_layout_); |
35 } | 35 } |
36 | 36 |
37 void ImeKeyboardOzone::SetCapsLockEnabled(bool enable_caps_lock) { | 37 void ImeKeyboardOzone::SetCapsLockEnabled(bool enable_caps_lock) { |
| 38 // Inform ImeKeyboard of caps lock state. |
| 39 ImeKeyboard::SetCapsLockEnabled(enable_caps_lock); |
| 40 // Inform Ozone InputController input of caps lock state. |
38 input_controller_->SetCapsLockEnabled(enable_caps_lock); | 41 input_controller_->SetCapsLockEnabled(enable_caps_lock); |
39 } | 42 } |
40 | 43 |
41 bool ImeKeyboardOzone::CapsLockIsEnabled() { | 44 bool ImeKeyboardOzone::CapsLockIsEnabled() { |
42 return input_controller_->IsCapsLockEnabled(); | 45 return input_controller_->IsCapsLockEnabled(); |
43 } | 46 } |
44 | 47 |
45 void ImeKeyboardOzone::ReapplyCurrentModifierLockStatus() { | 48 void ImeKeyboardOzone::ReapplyCurrentModifierLockStatus() { |
46 } | 49 } |
47 | 50 |
(...skipping 18 matching lines...) Expand all Loading... |
66 } | 69 } |
67 | 70 |
68 // static | 71 // static |
69 ImeKeyboard* ImeKeyboard::Create() { | 72 ImeKeyboard* ImeKeyboard::Create() { |
70 return new ImeKeyboardOzone( | 73 return new ImeKeyboardOzone( |
71 ui::OzonePlatform::GetInstance()->GetInputController()); | 74 ui::OzonePlatform::GetInstance()->GetInputController()); |
72 } | 75 } |
73 | 76 |
74 } // namespace input_method | 77 } // namespace input_method |
75 } // namespace chromeos | 78 } // namespace chromeos |
OLD | NEW |