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

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

Issue 150203015: Split out InputMethodMenuManager from InputMethodManager (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 10 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
« no previous file with comments | « chrome/browser/ui/ash/system_tray_delegate_chromeos.h ('k') | chromeos/chromeos.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 202ca5b41ad063146e27fd46bfa3535c585138c1..2bd4a6fce099125d017a59972f4399adaa47a9de 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"
@@ -298,6 +300,7 @@ void SystemTrayDelegateChromeOS::Initialize() {
DBusThreadManager::Get()->GetSessionManagerClient()->AddObserver(this);
input_method::InputMethodManager::Get()->AddObserver(this);
+ ash::ime::InputMethodMenuManager::Get()->AddObserver(this);
UpdateClockType();
if (SystemKeyEventListener::GetInstance())
@@ -358,6 +361,7 @@ SystemTrayDelegateChromeOS::~SystemTrayDelegateChromeOS() {
DBusThreadManager::Get()->GetSessionManagerClient()->RemoveObserver(this);
input_method::InputMethodManager::Get()->RemoveObserver(this);
+ ash::ime::InputMethodMenuManager::Get()->RemoveObserver(this);
if (SystemKeyEventListener::GetInstance())
SystemKeyEventListener::GetInstance()->RemoveCapsLockObserver(this);
bluetooth_adapter_->RemoveObserver(this);
@@ -762,15 +766,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::Get()->
+ 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);
}
}
@@ -780,7 +783,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) {
@@ -1197,8 +1200,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);
}
« no previous file with comments | « chrome/browser/ui/ash/system_tray_delegate_chromeos.h ('k') | chromeos/chromeos.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698