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

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

Issue 2436723002: Override keyset with the IME layout info. (Closed)
Patch Set: Add call of Reload() back. Created 4 years, 2 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
« no previous file with comments | « no previous file | chrome/browser/chromeos/input_method/input_method_manager_impl_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « no previous file | chrome/browser/chromeos/input_method/input_method_manager_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698