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

Unified Diff: ash/accelerators/accelerator_controller.cc

Issue 12096027: Adds an ash global shortcut key for message center. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | ash/accelerators/accelerator_table.h » ('j') | ash/accelerators/accelerator_table.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/accelerators/accelerator_controller.cc
diff --git a/ash/accelerators/accelerator_controller.cc b/ash/accelerators/accelerator_controller.cc
index 26c073061c17de8a76bf8041914b990f15423375..9cd8b41b4a25790cb5b3b0197282c522b7afa283 100644
--- a/ash/accelerators/accelerator_controller.cc
+++ b/ash/accelerators/accelerator_controller.cc
@@ -33,6 +33,7 @@
#include "ash/system/status_area_widget.h"
#include "ash/system/tray/system_tray.h"
#include "ash/system/tray/system_tray_delegate.h"
+#include "ash/system/web_notification/web_notification_tray.h"
#include "ash/touch/touch_observer_hud.h"
#include "ash/volume_control_delegate.h"
#include "ash/wm/partial_screenshot_view.h"
@@ -627,6 +628,21 @@ bool AcceleratorController::PerformAction(int action,
controller->GetSystemTray()->ShowDefaultView(BUBBLE_CREATE_NEW);
break;
}
+ case TOGGLE_MESSAGE_CENTER_BUBBLE: {
+ internal::RootWindowController* controller =
+ Shell::IsLauncherPerDisplayEnabled() ?
+ internal::RootWindowController::ForActiveRootWindow() :
+ Shell::GetPrimaryRootWindowController();
stevenjb 2013/01/28 23:46:56 Any reason we can't put this logic in RootWindowCo
+ internal::StatusAreaWidget* status_area_widget =
+ controller->status_area_widget();
+ if (status_area_widget) {
+ WebNotificationTray* notification_tray =
+ status_area_widget->web_notification_tray();
+ if (notification_tray->visible())
stevenjb 2013/01/28 23:46:56 Won't this test fail if the launcher is auto-hidde
+ notification_tray->ToggleMessageCenterBubble();
+ }
+ break;
+ }
case SHOW_TASK_MANAGER:
Shell::GetInstance()->delegate()->ShowTaskManager();
return true;
« no previous file with comments | « no previous file | ash/accelerators/accelerator_table.h » ('j') | ash/accelerators/accelerator_table.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698