| Index: ash/common/accelerators/accelerator_controller.cc
|
| diff --git a/ash/common/accelerators/accelerator_controller.cc b/ash/common/accelerators/accelerator_controller.cc
|
| index bd150611ab1a0f3f5772595acc9fbdef46af9241..339f230e8ff8e04918a09c55c55f27ca8877195b 100644
|
| --- a/ash/common/accelerators/accelerator_controller.cc
|
| +++ b/ash/common/accelerators/accelerator_controller.cc
|
| @@ -24,6 +24,7 @@
|
| #include "ash/common/system/tray/system_tray_delegate.h"
|
| #include "ash/common/system/tray/system_tray_notifier.h"
|
| #include "ash/common/system/volume_control_delegate.h"
|
| +#include "ash/common/system/web_notification/web_notification_tray.h"
|
| #include "ash/common/wm/mru_window_tracker.h"
|
| #include "ash/common/wm/overview/window_selector_controller.h"
|
| #include "ash/common/wm/window_cycle_controller.h"
|
| @@ -221,6 +222,27 @@ void HandleShowKeyboardOverlay() {
|
| WmShell::Get()->new_window_delegate()->ShowKeyboardOverlay();
|
| }
|
|
|
| +bool CanHandleShowMessageCenterBubble() {
|
| + WmWindow* target_root = WmShell::Get()->GetRootWindowForNewWindows();
|
| + StatusAreaWidget* status_area_widget =
|
| + WmShelf::ForWindow(target_root)->shelf_widget()->status_area_widget();
|
| + return status_area_widget &&
|
| + status_area_widget->web_notification_tray()->visible();
|
| +}
|
| +
|
| +void HandleShowMessageCenterBubble() {
|
| + base::RecordAction(UserMetricsAction("Accel_Show_Message_Center_Bubble"));
|
| + WmWindow* target_root = WmShell::Get()->GetRootWindowForNewWindows();
|
| + StatusAreaWidget* status_area_widget =
|
| + WmShelf::ForWindow(target_root)->shelf_widget()->status_area_widget();
|
| + if (status_area_widget) {
|
| + WebNotificationTray* notification_tray =
|
| + status_area_widget->web_notification_tray();
|
| + if (notification_tray->visible())
|
| + notification_tray->ShowMessageCenterBubble();
|
| + }
|
| +}
|
| +
|
| void HandleShowTaskManager() {
|
| base::RecordAction(UserMetricsAction("Accel_Show_Task_Manager"));
|
| WmShell::Get()->new_window_delegate()->ShowTaskManager();
|
| @@ -729,6 +751,8 @@ bool AcceleratorController::CanPerformAction(
|
| return CanHandleNextIme(ime_control_delegate_.get());
|
| case PREVIOUS_IME:
|
| return CanHandlePreviousIme(ime_control_delegate_.get());
|
| + case SHOW_MESSAGE_CENTER_BUBBLE:
|
| + return CanHandleShowMessageCenterBubble();
|
| case SWITCH_IME:
|
| return CanHandleSwitchIme(ime_control_delegate_.get(), accelerator);
|
| case TOGGLE_APP_LIST:
|
| @@ -910,6 +934,9 @@ void AcceleratorController::PerformAction(AcceleratorAction action,
|
| case SHOW_KEYBOARD_OVERLAY:
|
| HandleShowKeyboardOverlay();
|
| break;
|
| + case SHOW_MESSAGE_CENTER_BUBBLE:
|
| + HandleShowMessageCenterBubble();
|
| + break;
|
| case SHOW_TASK_MANAGER:
|
| HandleShowTaskManager();
|
| break;
|
|
|