| 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 | 6 |
| 7 #include "ui/ozone/public/input_controller.h" | 7 #include "ui/ozone/public/input_controller.h" |
| 8 #include "ui/ozone/public/ozone_platform.h" | 8 #include "ui/ozone/public/ozone_platform.h" |
| 9 | 9 |
| 10 namespace chromeos { | 10 namespace chromeos { |
| 11 namespace input_method { | 11 namespace input_method { |
| 12 | 12 |
| 13 ImeKeyboardOzone::ImeKeyboardOzone(ui::InputController* input_controller) | 13 ImeKeyboardOzone::ImeKeyboardOzone(ui::InputController* input_controller) |
| 14 : input_controller_(input_controller) { | 14 : input_controller_(input_controller) { |
| 15 } | 15 } |
| 16 | 16 |
| 17 | 17 |
| 18 ImeKeyboardOzone::~ImeKeyboardOzone() { | 18 ImeKeyboardOzone::~ImeKeyboardOzone() { |
| 19 } | 19 } |
| 20 | 20 |
| 21 bool ImeKeyboardOzone::SetCurrentKeyboardLayoutByName( | 21 bool ImeKeyboardOzone::SetCurrentKeyboardLayoutByName( |
| 22 const std::string& layout_name) { | 22 const std::string& layout_name) { |
| 23 ImeKeyboard::SetCurrentKeyboardLayoutByName(layout_name); |
| 23 last_layout_ = layout_name; | 24 last_layout_ = layout_name; |
| 24 input_controller_->SetCurrentLayoutByName(layout_name); | 25 input_controller_->SetCurrentLayoutByName(layout_name); |
| 25 return true; | 26 return true; |
| 26 } | 27 } |
| 27 | 28 |
| 28 bool ImeKeyboardOzone::ReapplyCurrentKeyboardLayout() { | 29 bool ImeKeyboardOzone::ReapplyCurrentKeyboardLayout() { |
| 29 return SetCurrentKeyboardLayoutByName(last_layout_); | 30 return SetCurrentKeyboardLayoutByName(last_layout_); |
| 30 } | 31 } |
| 31 | 32 |
| 32 void ImeKeyboardOzone::SetCapsLockEnabled(bool enable_caps_lock) { | 33 void ImeKeyboardOzone::SetCapsLockEnabled(bool enable_caps_lock) { |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 } | 65 } |
| 65 | 66 |
| 66 // static | 67 // static |
| 67 ImeKeyboard* ImeKeyboard::Create() { | 68 ImeKeyboard* ImeKeyboard::Create() { |
| 68 return new ImeKeyboardOzone( | 69 return new ImeKeyboardOzone( |
| 69 ui::OzonePlatform::GetInstance()->GetInputController()); | 70 ui::OzonePlatform::GetInstance()->GetInputController()); |
| 70 } | 71 } |
| 71 | 72 |
| 72 } // namespace input_method | 73 } // namespace input_method |
| 73 } // namespace chromeos | 74 } // namespace chromeos |
| OLD | NEW |