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

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

Issue 15959004: Fix Incognito input method handling. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 7 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 | no next file » | 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 a7778df8b8e842bf1f413a08d6c1908f895ed6eb..f1102d9f6c50f93b2fc255c098330842d0a19874 100644
--- a/chrome/browser/chromeos/input_method/input_method_manager_impl.cc
+++ b/chrome/browser/chromeos/input_method/input_method_manager_impl.cc
@@ -284,17 +284,6 @@ bool InputMethodManagerImpl::ChangeInputMethodInternal(
if (state_ == STATE_TERMINATING)
return false;
- if (!component_extension_ime_manager_->IsInitialized() ||
- (!InputMethodUtil::IsKeyboardLayout(input_method_id) &&
- !IsIBusConnectionAlive())) {
- // We can't change input method before the initialization of component
- // extension ime manager or before connection to ibus-daemon is not
- // established. ChangeInputMethod will be called with
- // |pending_input_method_| when the both initialization is done.
- pending_input_method_ = input_method_id;
- return false;
- }
-
std::string input_method_id_to_switch = input_method_id;
// Sanity check.
@@ -309,6 +298,17 @@ bool InputMethodManagerImpl::ChangeInputMethodInternal(
}
}
+ if (!component_extension_ime_manager_->IsInitialized() ||
+ (!InputMethodUtil::IsKeyboardLayout(input_method_id_to_switch) &&
+ !IsIBusConnectionAlive())) {
+ // We can't change input method before the initialization of component
+ // extension ime manager or before connection to ibus-daemon is not
+ // established. ChangeInputMethod will be called with
+ // |pending_input_method_| when the both initialization is done.
+ pending_input_method_ = input_method_id_to_switch;
+ return false;
+ }
+
IBusInputContextClient* input_context =
chromeos::DBusThreadManager::Get()->GetIBusInputContextClient();
const std::string current_input_method_id = current_input_method_.id();
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698