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

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: 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/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 4c98092b30ebcb1fc6c3ddd99ffb008547bb1092..6c528d2cd3f1c0729c03910a7a4d7ecad7a7d0a4 100644
--- a/chrome/browser/ui/ash/system_tray_delegate_chromeos.cc
+++ b/chrome/browser/ui/ash/system_tray_delegate_chromeos.cc
@@ -694,7 +694,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;
}
@@ -704,8 +705,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;
@@ -730,7 +732,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) {
« no previous file with comments | « chrome/browser/ui/ash/ime_controller_chromeos.cc ('k') | chrome/browser/ui/webui/chromeos/keyboard_overlay_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698