Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(571)

Unified Diff: chrome/browser/chromeos/input_method/input_method_manager_impl.cc

Issue 495593004: Check the IME component extension's availability on linux_chromeos, so that system fallback VK can … (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nits. Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chromeos/input_method/input_method_manager_impl.cc
diff --git a/chrome/browser/chromeos/input_method/input_method_manager_impl.cc b/chrome/browser/chromeos/input_method/input_method_manager_impl.cc
index 6679b587b585e7ee94a2b4cd2f762fc3db7d809d..8337b7226ced76679e6ee99eb856325c90e64f7d 100644
--- a/chrome/browser/chromeos/input_method/input_method_manager_impl.cc
+++ b/chrome/browser/chromeos/input_method/input_method_manager_impl.cc
@@ -36,6 +36,8 @@
#include "components/user_manager/user_manager.h"
#include "third_party/icu/source/common/unicode/uloc.h"
#include "ui/base/accelerators/accelerator.h"
+#include "ui/keyboard/keyboard_controller.h"
+#include "ui/keyboard/keyboard_util.h"
namespace chromeos {
namespace input_method {
@@ -914,8 +916,17 @@ void InputMethodManagerImpl::ChangeInputMethodInternal(
IMEBridge::Get()->SetCurrentEngineHandler(engine);
- if (engine)
+ if (engine) {
engine->Enable(component_id);
+ } else {
+ // If no engine to enable, cancel the virtual keyboard url override so that
+ // it can use the fallback system virtual keyboard UI.
+ keyboard::SetOverrideContentUrl(GURL());
+ keyboard::KeyboardController* keyboard_controller =
+ keyboard::KeyboardController::GetInstance();
+ if (keyboard_controller)
+ keyboard_controller->Reload();
+ }
// Change the keyboard layout to a preferred layout for the input method.
if (!keyboard_->SetCurrentKeyboardLayoutByName(

Powered by Google App Engine
This is Rietveld 408576698