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 fb5e5f45dcfbb284a597162f5e6d29b29086ce9a..c6eb51a8d5aec20cb64b03fe33c6cbbc45764ea2 100644 |
--- a/chrome/browser/chromeos/input_method/input_method_manager_impl.cc |
+++ b/chrome/browser/chromeos/input_method/input_method_manager_impl.cc |
@@ -1228,23 +1228,24 @@ void InputMethodManagerImpl::OverrideKeyboardUrlRef(const std::string& keyset) { |
return; |
if (keyset.empty()) { |
+ // Resets the url as the input method default url and notify the hash |
+ // changed to VK. |
keyboard::SetOverrideContentUrl( |
GetActiveIMEState()->GetCurrentInputMethod().input_view_url()); |
+ keyboard::KeyboardController* keyboard_controller = |
+ keyboard::KeyboardController::GetInstance(); |
+ if (keyboard_controller) |
+ keyboard_controller->Reload(); |
return; |
} |
// For system IME extension, the input view url is overridden as: |
// chrome-extension://${extension_id}/inputview.html#id=us.compact.qwerty |
// &language=en-US&passwordLayout=us.compact.qwerty&name=keyboard_us |
- // Fow emoji and handwriting input, we replace the id=${keyset} part with |
- // desired keyset like: id=emoji; For voice, we append ".voice" to the end of |
- // id like: id=${keyset}.voice. |
+ // Fow emoji, handwriting and voice input, we append the keyset to the end of |
+ // id like: id=${keyset}.emoji/hwt/voice. |
auto j = overridden_ref.find("&", i + 1); |
- if (keyset == "voice") { |
- overridden_ref.replace(j, 0, "." + keyset); |
- } else { |
- overridden_ref.replace(i, j - i, "id=" + keyset); |
- } |
+ overridden_ref.replace(j, 0, "." + keyset); |
Shu Chen
2016/10/24 01:30:47
To reduce the risk of potential breakage, can you
Azure Wei
2016/10/24 08:11:09
Done.
|
GURL::Replacements replacements; |
replacements.SetRefStr(overridden_ref); |