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

Unified Diff: chrome/browser/ui/ash/system_tray_delegate_chromeos.cc

Issue 419293002: IME refactoring: ChromeOS introduce input methods State. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Cleanup. 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/ui/ash/system_tray_delegate_chromeos.cc
diff --git a/chrome/browser/ui/ash/system_tray_delegate_chromeos.cc b/chrome/browser/ui/ash/system_tray_delegate_chromeos.cc
index 5e0d2b5058a6db11be1bb04c30fa7045e073d0e8..68f4685827e65c0a0dfba1b065f93993628451b7 100644
--- a/chrome/browser/ui/ash/system_tray_delegate_chromeos.cc
+++ b/chrome/browser/ui/ash/system_tray_delegate_chromeos.cc
@@ -670,7 +670,8 @@ void SystemTrayDelegateChromeOS::GetCurrentIME(ash::IMEInfo* info) {
input_method::InputMethodManager* manager =
input_method::InputMethodManager::Get();
input_method::InputMethodUtil* util = manager->GetInputMethodUtil();
- input_method::InputMethodDescriptor ime = manager->GetCurrentInputMethod();
+ input_method::InputMethodDescriptor ime =
+ manager->GetActiveIMEState()->GetCurrentInputMethod();
ExtractIMEInfo(ime, *util, info);
info->selected = true;
}
@@ -680,8 +681,9 @@ void SystemTrayDelegateChromeOS::GetAvailableIMEList(ash::IMEInfoList* list) {
input_method::InputMethodManager::Get();
input_method::InputMethodUtil* util = manager->GetInputMethodUtil();
scoped_ptr<input_method::InputMethodDescriptors> ime_descriptors(
- manager->GetActiveInputMethods());
- std::string current = manager->GetCurrentInputMethod().id();
+ manager->GetActiveIMEState()->GetActiveInputMethods());
+ std::string current =
+ manager->GetActiveIMEState()->GetCurrentInputMethod().id();
for (size_t i = 0; i < ime_descriptors->size(); i++) {
input_method::InputMethodDescriptor& ime = ime_descriptors->at(i);
ash::IMEInfo info;
@@ -706,7 +708,9 @@ void SystemTrayDelegateChromeOS::GetCurrentIMEProperties(
}
void SystemTrayDelegateChromeOS::SwitchIME(const std::string& ime_id) {
- input_method::InputMethodManager::Get()->ChangeInputMethod(ime_id);
+ input_method::InputMethodManager::Get()
+ ->GetActiveIMEState()
+ ->ChangeInputMethod(ime_id, false /* show_message */);
}
void SystemTrayDelegateChromeOS::ActivateIMEProperty(const std::string& key) {

Powered by Google App Engine
This is Rietveld 408576698