Chromium Code Reviews| Index: ash/common/accelerators/accelerator_controller.cc |
| diff --git a/ash/common/accelerators/accelerator_controller.cc b/ash/common/accelerators/accelerator_controller.cc |
| index 11471e730a1566759d07dc6e53c12c6147b1494f..ea04489a1fb59df643e641470689ed9c2fee1a09 100644 |
| --- a/ash/common/accelerators/accelerator_controller.cc |
| +++ b/ash/common/accelerators/accelerator_controller.cc |
| @@ -173,26 +173,6 @@ bool CanHandleCycleMru(const ui::Accelerator& accelerator) { |
| return !(keyboard_controller && keyboard_controller->keyboard_visible()); |
| } |
| -// We must avoid showing the Deprecated NEXT_IME notification erronously. |
| -bool ShouldShowDeprecatedNextImeNotification( |
| - const ui::Accelerator& previous_accelerator) { |
| - // We only show the deprecation notification if the previous accelerator key |
| - // is ONLY either Shift, or Alt. |
| - const ui::KeyboardCode previous_key_code = previous_accelerator.key_code(); |
| - switch (previous_key_code) { |
| - case ui::VKEY_SHIFT: |
| - case ui::VKEY_LSHIFT: |
| - case ui::VKEY_RSHIFT: |
| - case ui::VKEY_MENU: |
| - case ui::VKEY_LMENU: |
| - case ui::VKEY_RMENU: |
| - return true; |
| - |
| - default: |
| - return false; |
| - } |
| -} |
| - |
| void HandleNextIme(ImeControlDelegate* ime_control_delegate) { |
| base::RecordAction(UserMetricsAction("Accel_Next_Ime")); |
| ime_control_delegate->HandleNextIme(); |
| @@ -648,14 +628,8 @@ bool AcceleratorController::AcceleratorPressed( |
| // Record UMA stats. |
| RecordUmaHistogram(data->uma_histogram_name, DEPRECATED_USED); |
| - // We always display the notification as long as this entry exists, |
| - // except for NEXT_IME, we must check to avoid showing it for the wrong |
| - // shortcut, as Alt+Shift is tricky and trigger the action on release. |
| - if (delegate_ && |
| - (action != NEXT_IME || |
| - (action == NEXT_IME && |
| - ShouldShowDeprecatedNextImeNotification( |
| - accelerator_history_->previous_accelerator())))) { |
| + if (delegate_) { |
|
James Cook
2017/01/26 22:24:52
It's not your fault, but this function is deeply n
afakhry
2017/01/27 03:35:06
Actually, it is my fault, I'm the one who wrote th
|
| + // We always display the notification as long as this entry exists. |
| delegate_->ShowDeprecatedAcceleratorNotification( |
| data->uma_histogram_name, data->notification_message_id, |
| data->old_shortcut_id, data->new_shortcut_id); |