OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "ash/accelerators/accelerator_controller.h" | 5 #include "ash/accelerators/accelerator_controller.h" |
6 | 6 |
7 #include "ash/accelerators/accelerator_table.h" | 7 #include "ash/accelerators/accelerator_table.h" |
8 #include "ash/ash_switches.h" | 8 #include "ash/ash_switches.h" |
9 #include "ash/caps_lock_delegate.h" | 9 #include "ash/caps_lock_delegate.h" |
10 #include "ash/desktop_background/desktop_background_controller.h" | 10 #include "ash/desktop_background/desktop_background_controller.h" |
(...skipping 409 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
420 break; | 420 break; |
421 case FOCUS_TRAY: | 421 case FOCUS_TRAY: |
422 if (shell->tray()) | 422 if (shell->tray()) |
423 return shell->focus_cycler()->FocusWidget(shell->tray()->GetWidget()); | 423 return shell->focus_cycler()->FocusWidget(shell->tray()->GetWidget()); |
424 break; | 424 break; |
425 case SHOW_OAK: | 425 case SHOW_OAK: |
426 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kAshEnableOak)) | 426 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kAshEnableOak)) |
427 oak::ShowOakWindow(); | 427 oak::ShowOakWindow(); |
428 break; | 428 break; |
429 case NEXT_IME: | 429 case NEXT_IME: |
430 if (ime_control_delegate_.get()) { | 430 if (ime_control_delegate_.get()) |
431 ime_control_delegate_->HandleNextIme(); | 431 return ime_control_delegate_->HandleNextIme(); |
432 // We shouldn't consume Shift+Alt. crbug.com/123720 | |
433 // TODO(yusukes): We might be able to remove the hack when issue 123856 | |
434 // is fixed. | |
435 return false; | |
436 } | |
437 break; | 432 break; |
438 case PREVIOUS_IME: | 433 case PREVIOUS_IME: |
439 if (ime_control_delegate_.get()) | 434 if (ime_control_delegate_.get()) |
440 return ime_control_delegate_->HandlePreviousIme(); | 435 return ime_control_delegate_->HandlePreviousIme(); |
441 break; | 436 break; |
442 case SWITCH_IME: | 437 case SWITCH_IME: |
443 if (ime_control_delegate_.get()) | 438 if (ime_control_delegate_.get()) |
444 return ime_control_delegate_->HandleSwitchIme(accelerator); | 439 return ime_control_delegate_->HandleSwitchIme(accelerator); |
445 break; | 440 break; |
446 case SELECT_WIN_0: | 441 case SELECT_WIN_0: |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
557 // Then set this one as active. | 552 // Then set this one as active. |
558 ActivateLauncherItem(found_index); | 553 ActivateLauncherItem(found_index); |
559 } | 554 } |
560 } | 555 } |
561 | 556 |
562 bool AcceleratorController::CanHandleAccelerators() const { | 557 bool AcceleratorController::CanHandleAccelerators() const { |
563 return true; | 558 return true; |
564 } | 559 } |
565 | 560 |
566 } // namespace ash | 561 } // namespace ash |
OLD | NEW |