summaryrefslogtreecommitdiffstats
path: root/chrome/browser/ui/ash/system_tray_delegate_chromeos.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/ui/ash/system_tray_delegate_chromeos.cc')
-rw-r--r--chrome/browser/ui/ash/system_tray_delegate_chromeos.cc26
1 files changed, 15 insertions, 11 deletions
diff --git a/chrome/browser/ui/ash/system_tray_delegate_chromeos.cc b/chrome/browser/ui/ash/system_tray_delegate_chromeos.cc
index 1b5784d..2c320e9 100644
--- a/chrome/browser/ui/ash/system_tray_delegate_chromeos.cc
+++ b/chrome/browser/ui/ash/system_tray_delegate_chromeos.cc
@@ -11,6 +11,8 @@
#include "ash/ash_switches.h"
#include "ash/desktop_background/desktop_background_controller.h"
+#include "ash/ime/input_method_menu_item.h"
+#include "ash/ime/input_method_menu_manager.h"
#include "ash/metrics/user_metrics_recorder.h"
#include "ash/session_state_delegate.h"
#include "ash/session_state_observer.h"
@@ -297,6 +299,7 @@ void SystemTrayDelegateChromeOS::Initialize() {
DBusThreadManager::Get()->GetSessionManagerClient()->AddObserver(this);
input_method::InputMethodManager::Get()->AddObserver(this);
+ ash::ime::InputMethodMenuManager::GetInstance()->AddObserver(this);
UpdateClockType();
if (SystemKeyEventListener::GetInstance())
@@ -360,6 +363,7 @@ SystemTrayDelegateChromeOS::~SystemTrayDelegateChromeOS() {
DBusThreadManager::Get()->GetSessionManagerClient()->RemoveObserver(this);
input_method::InputMethodManager::Get()->RemoveObserver(this);
+ ash::ime::InputMethodMenuManager::GetInstance()->RemoveObserver(this);
if (SystemKeyEventListener::GetInstance())
SystemKeyEventListener::GetInstance()->RemoveCapsLockObserver(this);
bluetooth_adapter_->RemoveObserver(this);
@@ -772,15 +776,14 @@ void SystemTrayDelegateChromeOS::GetAvailableIMEList(ash::IMEInfoList* list) {
void SystemTrayDelegateChromeOS::GetCurrentIMEProperties(
ash::IMEPropertyInfoList* list) {
- input_method::InputMethodManager* manager =
- input_method::InputMethodManager::Get();
- input_method::InputMethodPropertyList properties =
- manager->GetCurrentInputMethodProperties();
- for (size_t i = 0; i < properties.size(); ++i) {
+ ash::ime::InputMethodMenuItemList menu_list =
+ ash::ime::InputMethodMenuManager::GetInstance()->
+ GetCurrentInputMethodMenuItemList();
+ for (size_t i = 0; i < menu_list.size(); ++i) {
ash::IMEPropertyInfo property;
- property.key = properties[i].key;
- property.name = base::UTF8ToUTF16(properties[i].label);
- property.selected = properties[i].is_selection_item_checked;
+ property.key = menu_list[i].key;
+ property.name = base::UTF8ToUTF16(menu_list[i].label);
+ property.selected = menu_list[i].is_selection_item_checked;
list->push_back(property);
}
}
@@ -790,7 +793,7 @@ void SystemTrayDelegateChromeOS::SwitchIME(const std::string& ime_id) {
}
void SystemTrayDelegateChromeOS::ActivateIMEProperty(const std::string& key) {
- input_method::InputMethodManager::Get()->ActivateInputMethodProperty(key);
+ input_method::InputMethodManager::Get()->ActivateInputMethodMenuItem(key);
}
void SystemTrayDelegateChromeOS::CancelDriveOperation(int32 operation_id) {
@@ -1207,8 +1210,9 @@ void SystemTrayDelegateChromeOS::InputMethodChanged(
GetSystemTrayNotifier()->NotifyRefreshIME(show_message);
}
-void SystemTrayDelegateChromeOS::InputMethodPropertyChanged(
- input_method::InputMethodManager* manager) {
+// Overridden from InputMethodMenuManager::Observer.
+void SystemTrayDelegateChromeOS::InputMethodMenuItemChanged(
+ ash::ime::InputMethodMenuManager* manager) {
GetSystemTrayNotifier()->NotifyRefreshIME(false);
}