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

Side by Side Diff: ash/accelerators/accelerator_controller.cc

Issue 12313118: Refactor: Shelf Widget (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: safer shutdown (status_area_widget_) Created 7 years, 9 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 unified diff | Download patch
« no previous file with comments | « no previous file | ash/ash.gyp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
11 #include "ash/accelerators/accelerator_table.h" 11 #include "ash/accelerators/accelerator_table.h"
12 #include "ash/ash_switches.h" 12 #include "ash/ash_switches.h"
13 #include "ash/caps_lock_delegate.h" 13 #include "ash/caps_lock_delegate.h"
14 #include "ash/desktop_background/desktop_background_controller.h" 14 #include "ash/desktop_background/desktop_background_controller.h"
15 #include "ash/desktop_background/user_wallpaper_delegate.h" 15 #include "ash/desktop_background/user_wallpaper_delegate.h"
16 #include "ash/display/display_controller.h" 16 #include "ash/display/display_controller.h"
17 #include "ash/display/display_manager.h" 17 #include "ash/display/display_manager.h"
18 #include "ash/focus_cycler.h" 18 #include "ash/focus_cycler.h"
19 #include "ash/ime_control_delegate.h" 19 #include "ash/ime_control_delegate.h"
20 #include "ash/launcher/launcher.h" 20 #include "ash/launcher/launcher.h"
21 #include "ash/launcher/launcher_delegate.h" 21 #include "ash/launcher/launcher_delegate.h"
22 #include "ash/launcher/launcher_model.h" 22 #include "ash/launcher/launcher_model.h"
23 #include "ash/magnifier/magnification_controller.h" 23 #include "ash/magnifier/magnification_controller.h"
24 #include "ash/magnifier/partial_magnification_controller.h" 24 #include "ash/magnifier/partial_magnification_controller.h"
25 #include "ash/root_window_controller.h" 25 #include "ash/root_window_controller.h"
26 #include "ash/rotator/screen_rotation.h" 26 #include "ash/rotator/screen_rotation.h"
27 #include "ash/screenshot_delegate.h" 27 #include "ash/screenshot_delegate.h"
28 #include "ash/shelf/shelf_widget.h"
28 #include "ash/shell.h" 29 #include "ash/shell.h"
29 #include "ash/shell_delegate.h" 30 #include "ash/shell_delegate.h"
30 #include "ash/shell_window_ids.h" 31 #include "ash/shell_window_ids.h"
31 #include "ash/system/brightness/brightness_control_delegate.h" 32 #include "ash/system/brightness/brightness_control_delegate.h"
32 #include "ash/system/keyboard_brightness/keyboard_brightness_control_delegate.h" 33 #include "ash/system/keyboard_brightness/keyboard_brightness_control_delegate.h"
33 #include "ash/system/status_area_widget.h" 34 #include "ash/system/status_area_widget.h"
34 #include "ash/system/tray/system_tray.h" 35 #include "ash/system/tray/system_tray.h"
35 #include "ash/system/tray/system_tray_delegate.h" 36 #include "ash/system/tray/system_tray_delegate.h"
36 #include "ash/system/web_notification/web_notification_tray.h" 37 #include "ash/system/web_notification/web_notification_tray.h"
37 #include "ash/touch/touch_observer_hud.h" 38 #include "ash/touch/touch_observer_hud.h"
(...skipping 569 matching lines...) Expand 10 before | Expand all | Expand 10 after
607 case VOLUME_DOWN: 608 case VOLUME_DOWN:
608 return shell->system_tray_delegate()->GetVolumeControlDelegate()-> 609 return shell->system_tray_delegate()->GetVolumeControlDelegate()->
609 HandleVolumeDown(accelerator); 610 HandleVolumeDown(accelerator);
610 break; 611 break;
611 case VOLUME_UP: 612 case VOLUME_UP:
612 return shell->system_tray_delegate()->GetVolumeControlDelegate()-> 613 return shell->system_tray_delegate()->GetVolumeControlDelegate()->
613 HandleVolumeUp(accelerator); 614 HandleVolumeUp(accelerator);
614 break; 615 break;
615 case FOCUS_LAUNCHER: 616 case FOCUS_LAUNCHER:
616 return shell->focus_cycler()->FocusWidget( 617 return shell->focus_cycler()->FocusWidget(
617 Launcher::ForPrimaryDisplay()->widget()); 618 Launcher::ForPrimaryDisplay()->shelf_widget());
618 break; 619 break;
619 case FOCUS_NEXT_PANE: 620 case FOCUS_NEXT_PANE:
620 return HandleRotatePaneFocus(Shell::FORWARD); 621 return HandleRotatePaneFocus(Shell::FORWARD);
621 case FOCUS_PREVIOUS_PANE: 622 case FOCUS_PREVIOUS_PANE:
622 return HandleRotatePaneFocus(Shell::BACKWARD); 623 return HandleRotatePaneFocus(Shell::BACKWARD);
623 case SHOW_KEYBOARD_OVERLAY: 624 case SHOW_KEYBOARD_OVERLAY:
624 ash::Shell::GetInstance()->delegate()->ShowKeyboardOverlay(); 625 ash::Shell::GetInstance()->delegate()->ShowKeyboardOverlay();
625 return true; 626 return true;
626 case SHOW_OAK: 627 case SHOW_OAK:
627 if (CommandLine::ForCurrentProcess()->HasSwitch( 628 if (CommandLine::ForCurrentProcess()->HasSwitch(
(...skipping 10 matching lines...) Expand all
638 if (!controller->GetSystemTray()->HasSystemBubble()) 639 if (!controller->GetSystemTray()->HasSystemBubble())
639 controller->GetSystemTray()->ShowDefaultView(BUBBLE_CREATE_NEW); 640 controller->GetSystemTray()->ShowDefaultView(BUBBLE_CREATE_NEW);
640 break; 641 break;
641 } 642 }
642 case SHOW_MESSAGE_CENTER_BUBBLE: { 643 case SHOW_MESSAGE_CENTER_BUBBLE: {
643 internal::RootWindowController* controller = 644 internal::RootWindowController* controller =
644 Shell::IsLauncherPerDisplayEnabled() ? 645 Shell::IsLauncherPerDisplayEnabled() ?
645 internal::RootWindowController::ForActiveRootWindow() : 646 internal::RootWindowController::ForActiveRootWindow() :
646 Shell::GetPrimaryRootWindowController(); 647 Shell::GetPrimaryRootWindowController();
647 internal::StatusAreaWidget* status_area_widget = 648 internal::StatusAreaWidget* status_area_widget =
648 controller->status_area_widget(); 649 controller->shelf()->status_area_widget();
649 if (status_area_widget) { 650 if (status_area_widget) {
650 WebNotificationTray* notification_tray = 651 WebNotificationTray* notification_tray =
651 status_area_widget->web_notification_tray(); 652 status_area_widget->web_notification_tray();
652 if (notification_tray->visible()) 653 if (notification_tray->visible())
653 notification_tray->ShowMessageCenterBubble(); 654 notification_tray->ShowMessageCenterBubble();
654 } 655 }
655 break; 656 break;
656 } 657 }
657 case SHOW_TASK_MANAGER: 658 case SHOW_TASK_MANAGER:
658 Shell::GetInstance()->delegate()->ShowTaskManager(); 659 Shell::GetInstance()->delegate()->ShowTaskManager();
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
866 keyboard_brightness_control_delegate) { 867 keyboard_brightness_control_delegate) {
867 keyboard_brightness_control_delegate_ = 868 keyboard_brightness_control_delegate_ =
868 keyboard_brightness_control_delegate.Pass(); 869 keyboard_brightness_control_delegate.Pass();
869 } 870 }
870 871
871 bool AcceleratorController::CanHandleAccelerators() const { 872 bool AcceleratorController::CanHandleAccelerators() const {
872 return true; 873 return true;
873 } 874 }
874 875
875 } // namespace ash 876 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | ash/ash.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698