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

Unified Diff: chrome/browser/chromeos/system/ash_system_tray_delegate.cc

Issue 9835045: Support IME properties in uber tray. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: remove explicit Created 8 years, 9 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 | « ash/system/tray/system_tray_delegate.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/system/ash_system_tray_delegate.cc
diff --git a/chrome/browser/chromeos/system/ash_system_tray_delegate.cc b/chrome/browser/chromeos/system/ash_system_tray_delegate.cc
index 81ae4a43340e91eb4680dc8c272461a0d280a264..d5a3febb606b5b590780c783a40453a30b47c19b 100644
--- a/chrome/browser/chromeos/system/ash_system_tray_delegate.cc
+++ b/chrome/browser/chromeos/system/ash_system_tray_delegate.cc
@@ -335,10 +335,34 @@ class SystemTrayDelegate : public ash::SystemTrayDelegate,
}
}
+ virtual void GetCurrentIMEProperties(
+ ash::IMEPropertyInfoList* list) OVERRIDE {
+ input_method::InputMethodManager* manager =
+ input_method::InputMethodManager::GetInstance();
+ input_method::InputMethodUtil* util = manager->GetInputMethodUtil();
+ input_method::InputMethodPropertyList properties =
+ manager->GetCurrentInputMethodProperties();
+ for (size_t i = 0; i < properties.size(); ++i) {
+ ash::IMEPropertyInfo property;
+ // Do not show the item not in the selection item.
+ if (!properties[i].is_selection_item)
+ continue;
+ property.key = properties[i].key;
+ property.name = util->TranslateString(properties[i].label);
+ property.selected = properties[i].is_selection_item_checked;
+ list->push_back(property);
+ }
+ }
+
virtual void SwitchIME(const std::string& ime_id) OVERRIDE {
input_method::InputMethodManager::GetInstance()->ChangeInputMethod(ime_id);
}
+ virtual void ActivateIMEProperty(const std::string& key) OVERRIDE {
+ input_method::InputMethodManager::GetInstance()->SetImePropertyActivated(
+ key, true);
+ }
+
virtual void GetMostRelevantNetworkIcon(ash::NetworkIconInfo* info,
bool large) OVERRIDE {
info->image = !large ? network_icon_->GetIconAndText(&info->description) :
« no previous file with comments | « ash/system/tray/system_tray_delegate.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698