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

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: 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') | ash/focus_cycler_unittest.cc » ('J')
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 561 matching lines...) Expand 10 before | Expand all | Expand 10 after
599 case VOLUME_DOWN: 600 case VOLUME_DOWN:
600 return shell->system_tray_delegate()->GetVolumeControlDelegate()-> 601 return shell->system_tray_delegate()->GetVolumeControlDelegate()->
601 HandleVolumeDown(accelerator); 602 HandleVolumeDown(accelerator);
602 break; 603 break;
603 case VOLUME_UP: 604 case VOLUME_UP:
604 return shell->system_tray_delegate()->GetVolumeControlDelegate()-> 605 return shell->system_tray_delegate()->GetVolumeControlDelegate()->
605 HandleVolumeUp(accelerator); 606 HandleVolumeUp(accelerator);
606 break; 607 break;
607 case FOCUS_LAUNCHER: 608 case FOCUS_LAUNCHER:
608 return shell->focus_cycler()->FocusWidget( 609 return shell->focus_cycler()->FocusWidget(
609 Launcher::ForPrimaryDisplay()->widget()); 610 Launcher::ForPrimaryDisplay()->shelf_widget());
610 break; 611 break;
611 case FOCUS_NEXT_PANE: 612 case FOCUS_NEXT_PANE:
612 return HandleRotatePaneFocus(Shell::FORWARD); 613 return HandleRotatePaneFocus(Shell::FORWARD);
613 case FOCUS_PREVIOUS_PANE: 614 case FOCUS_PREVIOUS_PANE:
614 return HandleRotatePaneFocus(Shell::BACKWARD); 615 return HandleRotatePaneFocus(Shell::BACKWARD);
615 case SHOW_KEYBOARD_OVERLAY: 616 case SHOW_KEYBOARD_OVERLAY:
616 ash::Shell::GetInstance()->delegate()->ShowKeyboardOverlay(); 617 ash::Shell::GetInstance()->delegate()->ShowKeyboardOverlay();
617 return true; 618 return true;
618 case SHOW_OAK: 619 case SHOW_OAK:
619 if (CommandLine::ForCurrentProcess()->HasSwitch( 620 if (CommandLine::ForCurrentProcess()->HasSwitch(
(...skipping 10 matching lines...) Expand all
630 if (!controller->GetSystemTray()->HasSystemBubble()) 631 if (!controller->GetSystemTray()->HasSystemBubble())
631 controller->GetSystemTray()->ShowDefaultView(BUBBLE_CREATE_NEW); 632 controller->GetSystemTray()->ShowDefaultView(BUBBLE_CREATE_NEW);
632 break; 633 break;
633 } 634 }
634 case SHOW_MESSAGE_CENTER_BUBBLE: { 635 case SHOW_MESSAGE_CENTER_BUBBLE: {
635 internal::RootWindowController* controller = 636 internal::RootWindowController* controller =
636 Shell::IsLauncherPerDisplayEnabled() ? 637 Shell::IsLauncherPerDisplayEnabled() ?
637 internal::RootWindowController::ForActiveRootWindow() : 638 internal::RootWindowController::ForActiveRootWindow() :
638 Shell::GetPrimaryRootWindowController(); 639 Shell::GetPrimaryRootWindowController();
639 internal::StatusAreaWidget* status_area_widget = 640 internal::StatusAreaWidget* status_area_widget =
640 controller->status_area_widget(); 641 controller->shelf()->status_area_widget();
641 if (status_area_widget) { 642 if (status_area_widget) {
642 WebNotificationTray* notification_tray = 643 WebNotificationTray* notification_tray =
643 status_area_widget->web_notification_tray(); 644 status_area_widget->web_notification_tray();
644 if (notification_tray->visible()) 645 if (notification_tray->visible())
645 notification_tray->ShowMessageCenterBubble(); 646 notification_tray->ShowMessageCenterBubble();
646 } 647 }
647 break; 648 break;
648 } 649 }
649 case SHOW_TASK_MANAGER: 650 case SHOW_TASK_MANAGER:
650 Shell::GetInstance()->delegate()->ShowTaskManager(); 651 Shell::GetInstance()->delegate()->ShowTaskManager();
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
858 keyboard_brightness_control_delegate) { 859 keyboard_brightness_control_delegate) {
859 keyboard_brightness_control_delegate_ = 860 keyboard_brightness_control_delegate_ =
860 keyboard_brightness_control_delegate.Pass(); 861 keyboard_brightness_control_delegate.Pass();
861 } 862 }
862 863
863 bool AcceleratorController::CanHandleAccelerators() const { 864 bool AcceleratorController::CanHandleAccelerators() const {
864 return true; 865 return true;
865 } 866 }
866 867
867 } // namespace ash 868 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | ash/ash.gyp » ('j') | ash/focus_cycler_unittest.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698