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

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

Issue 419293002: IME refactoring: ChromeOS introduce input methods State. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Unit test fixed. Re-sorted methods of StateImpl and IMM. 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_persistence.cc
diff --git a/chrome/browser/chromeos/input_method/input_method_persistence.cc b/chrome/browser/chromeos/input_method/input_method_persistence.cc
index e9a2cd9c8168bab062bf0efb14e5b3bd83c7fcea..b5d648396f13ec37e4f51b3753a495b69a547290 100644
--- a/chrome/browser/chromeos/input_method/input_method_persistence.cc
+++ b/chrome/browser/chromeos/input_method/input_method_persistence.cc
@@ -106,7 +106,7 @@ void PersistUserInputMethod(const std::string& input_method,
InputMethodPersistence::InputMethodPersistence(
InputMethodManager* input_method_manager)
: input_method_manager_(input_method_manager),
- state_(InputMethodManager::STATE_LOGIN_SCREEN) {
+ ui_session_(InputMethodManager::STATE_LOGIN_SCREEN) {
input_method_manager_->AddObserver(this);
}
@@ -118,9 +118,9 @@ void InputMethodPersistence::InputMethodChanged(
InputMethodManager* manager, bool show_message) {
DCHECK_EQ(input_method_manager_, manager);
const std::string current_input_method =
- manager->GetCurrentInputMethod().id();
+ manager->GetActiveIMEState()->GetCurrentInputMethod().id();
// Save the new input method id depending on the current browser state.
- switch (state_) {
+ switch (ui_session_) {
case InputMethodManager::STATE_LOGIN_SCREEN:
if (!manager->IsLoginKeyboard(current_input_method)) {
DVLOG(1) << "Only keyboard layouts are supported: "
@@ -142,8 +142,8 @@ void InputMethodPersistence::InputMethodChanged(
}
void InputMethodPersistence::OnSessionStateChange(
- InputMethodManager::State new_state) {
- state_ = new_state;
+ InputMethodManager::UISessionState new_ui_session) {
+ ui_session_ = new_ui_session;
}
} // namespace input_method

Powered by Google App Engine
This is Rietveld 408576698