| Index: ash/common/system/chromeos/ime_menu/ime_list_view.cc
|
| diff --git a/ash/common/system/chromeos/ime_menu/ime_list_view.cc b/ash/common/system/chromeos/ime_menu/ime_list_view.cc
|
| index fd8a852dc2ca7737a47f2c545924bce8d4aceb5c..a60d3106ad213a8ce81b13c79ffee3a32d607696 100644
|
| --- a/ash/common/system/chromeos/ime_menu/ime_list_view.cc
|
| +++ b/ash/common/system/chromeos/ime_menu/ime_list_view.cc
|
| @@ -129,28 +129,28 @@
|
| keyboard_status_ = container;
|
| }
|
|
|
| -void ImeListView::HandleViewClicked(views::View* view) {
|
| - if (view == keyboard_status_) {
|
| +void ImeListView::OnViewClicked(views::View* sender) {
|
| + SystemTrayDelegate* delegate = WmShell::Get()->system_tray_delegate();
|
| + if (sender == keyboard_status_) {
|
| WmShell::Get()->ToggleIgnoreExternalKeyboard();
|
| - return;
|
| + } else {
|
| + std::map<views::View*, std::string>::const_iterator ime_find;
|
| + ime_find = ime_map_.find(sender);
|
| + if (ime_find != ime_map_.end()) {
|
| + WmShell::Get()->RecordUserMetricsAction(UMA_STATUS_AREA_IME_SWITCH_MODE);
|
| + std::string ime_id = ime_find->second;
|
| + delegate->SwitchIME(ime_id);
|
| + GetWidget()->Close();
|
| + } else {
|
| + std::map<views::View*, std::string>::const_iterator prop_find;
|
| + prop_find = property_map_.find(sender);
|
| + if (prop_find != property_map_.end()) {
|
| + const std::string key = prop_find->second;
|
| + delegate->ActivateIMEProperty(key);
|
| + GetWidget()->Close();
|
| + }
|
| + }
|
| }
|
| -
|
| - SystemTrayDelegate* delegate = WmShell::Get()->system_tray_delegate();
|
| - std::map<views::View*, std::string>::const_iterator ime = ime_map_.find(view);
|
| - if (ime != ime_map_.end()) {
|
| - WmShell::Get()->RecordUserMetricsAction(UMA_STATUS_AREA_IME_SWITCH_MODE);
|
| - std::string ime_id = ime->second;
|
| - delegate->SwitchIME(ime_id);
|
| - } else {
|
| - std::map<views::View*, std::string>::const_iterator property =
|
| - property_map_.find(view);
|
| - if (property == property_map_.end())
|
| - return;
|
| - const std::string key = property->second;
|
| - delegate->ActivateIMEProperty(key);
|
| - }
|
| -
|
| - GetWidget()->Close();
|
| }
|
|
|
| } // namespace ash
|
|
|