diff options
Diffstat (limited to 'chromium/chrome/browser/extensions/api/input_ime/input_ime_api_chromeos.cc')
-rw-r--r-- | chromium/chrome/browser/extensions/api/input_ime/input_ime_api_chromeos.cc | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/chromium/chrome/browser/extensions/api/input_ime/input_ime_api_chromeos.cc b/chromium/chrome/browser/extensions/api/input_ime/input_ime_api_chromeos.cc index 243ca6ef46f..af09d9a572f 100644 --- a/chromium/chrome/browser/extensions/api/input_ime/input_ime_api_chromeos.cc +++ b/chromium/chrome/browser/extensions/api/input_ime/input_ime_api_chromeos.cc @@ -27,7 +27,6 @@ #include "ui/base/ime/chromeos/input_method_manager.h" #include "ui/base/ime/ime_engine_handler_interface.h" #include "ui/base/ui_base_features.h" -#include "ui/keyboard/keyboard_controller.h" namespace input_ime = extensions::api::input_ime; namespace input_method_private = extensions::api::input_method_private; @@ -219,6 +218,7 @@ class ImeObserverChromeOS : public ui::ImeObserver { input_context.auto_capitalize = (input_method_private::AutoCapitalizeType) ConvertInputContextAutoCapitalize(context); input_context.spell_check = ConvertInputContextSpellCheck(context); + input_context.has_been_password = ConvertHasBeenPassword(context); input_context.should_do_learning = context.should_do_learning; input_context.focus_reason = input_method_private::ParseFocusReason( ConvertInputContextFocusReason(context)); @@ -342,6 +342,11 @@ class ImeObserverChromeOS : public ui::ImeObserver { return ImeObserver::ConvertInputContextSpellCheck(input_context); } + bool ConvertHasBeenPassword( + ui::IMEEngineHandlerInterface::InputContext input_context) { + return input_context.flags & ui::TEXT_INPUT_FLAG_HAS_BEEN_PASSWORD; + } + DISALLOW_COPY_AND_ASSIGN(ImeObserverChromeOS); }; @@ -775,8 +780,8 @@ void InputImeAPI::OnExtensionUnloaded(content::BrowserContext* browser_context, // desktop shelf will disappear. see bugs: 775507,788247,786273,761714. // But still need to unload keyboard container document. Since ime extension // need to re-render the document when it's recovered. - auto* keyboard_controller = keyboard::KeyboardController::Get(); - if (keyboard_controller->IsEnabled()) { + auto* keyboard_client = ChromeKeyboardControllerClient::Get(); + if (keyboard_client->is_keyboard_enabled()) { // Keyboard controller "Reload" method only reload current page when the // url is changed. So we need unload the current page first. Then next // engine->Enable() can refresh the inputview page correctly. @@ -784,7 +789,7 @@ void InputImeAPI::OnExtensionUnloaded(content::BrowserContext* browser_context, // current page. // TODO(wuyingbing): Should add a new method to unload the document. manager->GetActiveIMEState()->DisableInputView(); - keyboard_controller->Reload(); + keyboard_client->ReloadKeyboardIfNeeded(); } event_router->SetUnloadedExtensionId(extension->id()); } else { |