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

Unified Diff: ash/system/ime/tray_ime.cc

Issue 10008043: Allow non-radio button properties in uber tray. Simplified chinese will use it. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix Created 8 years, 8 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/shell.cc ('k') | ash/system/tray/system_tray.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/system/ime/tray_ime.cc
diff --git a/ash/system/ime/tray_ime.cc b/ash/system/ime/tray_ime.cc
index 6e0ac615afcce06673dd9c2e6310800c7355d09e..8c43ad3c3e0c81c48fd3933b39138ee38d9ab2d2 100644
--- a/ash/system/ime/tray_ime.cc
+++ b/ash/system/ime/tray_ime.cc
@@ -4,6 +4,7 @@
#include "ash/system/ime/tray_ime.h"
+#include <utility>
#include <vector>
#include "ash/shell.h"
@@ -122,7 +123,7 @@ class IMEDetailedView : public views::View,
property_list[i].name,
property_list[i].selected ? gfx::Font::BOLD : gfx::Font::NORMAL);
properties->AddChildView(container);
- property_map_[container] = property_list[i].key;
+ property_map_[container] = property_list[i];
}
properties->set_border(views::Border::CreateSolidSidedBorder(
0, 0, 1, 0, kBorderLightColor));
@@ -153,11 +154,11 @@ class IMEDetailedView : public views::View,
delegate->SwitchIME(ime_id);
GetWidget()->Close();
} else {
- std::map<views::View*, std::string>::const_iterator prop_find;
+ std::map<views::View*, IMEPropertyInfo>::const_iterator prop_find;
prop_find = property_map_.find(sender);
if (prop_find != property_map_.end()) {
- std::string key = prop_find->second;
- delegate->ActivateIMEProperty(key);
+ const IMEPropertyInfo& prop = prop_find->second;
+ delegate->ActivateIMEProperty(prop.key, prop.is_selection);
GetWidget()->Close();
}
}
@@ -167,7 +168,7 @@ class IMEDetailedView : public views::View,
user::LoginStatus login_;
std::map<views::View*, std::string> ime_map_;
- std::map<views::View*, std::string> property_map_;
+ std::map<views::View*, IMEPropertyInfo> property_map_;
views::View* header_;
views::View* settings_;
« no previous file with comments | « ash/shell.cc ('k') | ash/system/tray/system_tray.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698