| 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 d28de2cdea5c14b194adb08ad9ce6b4d6c2ed509..5b6ec0add74368210ac8e62e79d4b30079800d65 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())
|
| @@ -357,6 +360,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);
|
| @@ -766,15 +770,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);
|
| }
|
| }
|
| @@ -784,7 +787,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) {
|
| @@ -1201,8 +1204,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);
|
| }
|
|
|
|
|