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

Unified Diff: ash/accelerators/accelerator_controller.cc

Issue 348293002: Do not consume Alt-Shift-Up event for IME switch. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Updating unit test expectations. Created 6 years, 6 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 | « no previous file | ash/accelerators/accelerator_controller_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/accelerators/accelerator_controller.cc
diff --git a/ash/accelerators/accelerator_controller.cc b/ash/accelerators/accelerator_controller.cc
index 7bb9643fbaf7aba62b4262a53b6a566bbf51d17f..b4ebea10f8c574b402a25f7c50f13c169dbac6cc 100644
--- a/ash/accelerators/accelerator_controller.cc
+++ b/ash/accelerators/accelerator_controller.cc
@@ -229,7 +229,7 @@ bool HandleNewWindow() {
return true;
}
-bool HandleNextIme(ImeControlDelegate* ime_control_delegate,
+void HandleNextIme(ImeControlDelegate* ime_control_delegate,
ui::EventType previous_event_type,
ui::KeyboardCode previous_key_code) {
// This check is necessary e.g. not to process the Shift+Alt+
@@ -247,12 +247,11 @@ bool HandleNextIme(ImeControlDelegate* ime_control_delegate,
previous_key_code != ui::VKEY_SPACE) {
// We totally ignore this accelerator.
// TODO(mazda): Fix crbug.com/158217
- return false;
+ return;
}
base::RecordAction(UserMetricsAction("Accel_Next_Ime"));
if (ime_control_delegate)
- return ime_control_delegate->HandleNextIme();
- return false;
+ ime_control_delegate->HandleNextIme();
}
bool HandleOpenFeedbackPage() {
@@ -1034,8 +1033,11 @@ bool AcceleratorController::PerformAction(int action,
case SHOW_TASK_MANAGER:
return HandleShowTaskManager();
case NEXT_IME:
- return HandleNextIme(
+ HandleNextIme(
ime_control_delegate_.get(), previous_event_type, previous_key_code);
+ // NEXT_IME is bound to Alt-Shift key up event. To be consistent with
+ // Windows behavior, do not consume the key event here.
+ return false;
case PREVIOUS_IME:
return HandlePreviousIme(ime_control_delegate_.get(), accelerator);
case PRINT_UI_HIERARCHIES:
« no previous file with comments | « no previous file | ash/accelerators/accelerator_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698