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 <algorithm> | 7 #include <algorithm> |
8 #include <cmath> | 8 #include <cmath> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 615 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
626 case SHOW_KEYBOARD_OVERLAY: | 626 case SHOW_KEYBOARD_OVERLAY: |
627 ash::Shell::GetInstance()->delegate()->ShowKeyboardOverlay(); | 627 ash::Shell::GetInstance()->delegate()->ShowKeyboardOverlay(); |
628 return true; | 628 return true; |
629 case SHOW_OAK: | 629 case SHOW_OAK: |
630 if (CommandLine::ForCurrentProcess()->HasSwitch( | 630 if (CommandLine::ForCurrentProcess()->HasSwitch( |
631 switches::kAshEnableOak)) { | 631 switches::kAshEnableOak)) { |
632 oak::ShowOakWindow(); | 632 oak::ShowOakWindow(); |
633 return true; | 633 return true; |
634 } | 634 } |
635 break; | 635 break; |
636 case SHOW_SYSTEM_TRAY_BUBBLE: | 636 case SHOW_SYSTEM_TRAY_BUBBLE: { |
637 if (!shell->system_tray()->HasSystemBubble()) | 637 internal::RootWindowController* controller = |
638 shell->system_tray()->ShowDefaultView(BUBBLE_CREATE_NEW); | 638 Shell::IsLauncherPerDisplayEnabled() ? |
| 639 internal::RootWindowController::ForActiveRootWindow() : |
| 640 Shell::GetPrimaryRootWindowController(); |
| 641 if (!controller->GetSystemTray()->HasSystemBubble()) |
| 642 controller->GetSystemTray()->ShowDefaultView(BUBBLE_CREATE_NEW); |
639 break; | 643 break; |
| 644 } |
640 case SHOW_TASK_MANAGER: | 645 case SHOW_TASK_MANAGER: |
641 Shell::GetInstance()->delegate()->ShowTaskManager(); | 646 Shell::GetInstance()->delegate()->ShowTaskManager(); |
642 return true; | 647 return true; |
643 case NEXT_IME: | 648 case NEXT_IME: |
644 // This check is necessary e.g. not to process the Shift+Alt+ | 649 // This check is necessary e.g. not to process the Shift+Alt+ |
645 // ET_KEY_RELEASED accelerator for Chrome OS (see ash/accelerators/ | 650 // ET_KEY_RELEASED accelerator for Chrome OS (see ash/accelerators/ |
646 // accelerator_controller.cc) when Shift+Alt+Tab is pressed and then Tab | 651 // accelerator_controller.cc) when Shift+Alt+Tab is pressed and then Tab |
647 // is released. | 652 // is released. |
648 if (previous_event_type == ui::ET_KEY_RELEASED && | 653 if (previous_event_type == ui::ET_KEY_RELEASED && |
649 // Workaround for crbug.com/139556. CJK IME users tend to press | 654 // Workaround for crbug.com/139556. CJK IME users tend to press |
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
874 keyboard_brightness_control_delegate) { | 879 keyboard_brightness_control_delegate) { |
875 keyboard_brightness_control_delegate_ = | 880 keyboard_brightness_control_delegate_ = |
876 keyboard_brightness_control_delegate.Pass(); | 881 keyboard_brightness_control_delegate.Pass(); |
877 } | 882 } |
878 | 883 |
879 bool AcceleratorController::CanHandleAccelerators() const { | 884 bool AcceleratorController::CanHandleAccelerators() const { |
880 return true; | 885 return true; |
881 } | 886 } |
882 | 887 |
883 } // namespace ash | 888 } // namespace ash |
OLD | NEW |