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

Unified Diff: ash/accelerators/accelerator_controller_delegate_aura.cc

Issue 2304443002: ash: Move ShelfWidget ownership to WmShelf and refactor access to it (Closed)
Patch Set: review comments Created 4 years, 4 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/aura/wm_root_window_controller_aura.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/accelerators/accelerator_controller_delegate_aura.cc
diff --git a/ash/accelerators/accelerator_controller_delegate_aura.cc b/ash/accelerators/accelerator_controller_delegate_aura.cc
index 8c3584fceb466bf945f5831fef9a35a48a76c842..bb430d3df2a29edb390d669197889c8b90b71c95 100644
--- a/ash/accelerators/accelerator_controller_delegate_aura.cc
+++ b/ash/accelerators/accelerator_controller_delegate_aura.cc
@@ -15,14 +15,11 @@
#include "ash/common/ash_switches.h"
#include "ash/common/gpu_support.h"
#include "ash/common/session/session_state_delegate.h"
-#include "ash/common/shelf/shelf_widget.h"
#include "ash/common/shelf/wm_shelf.h"
#include "ash/common/shell_delegate.h"
#include "ash/common/shell_window_ids.h"
-#include "ash/common/system/status_area_widget.h"
#include "ash/common/system/system_notifier.h"
#include "ash/common/system/tray/system_tray.h"
-#include "ash/common/system/web_notification/web_notification_tray.h"
#include "ash/common/wallpaper/wallpaper_delegate.h"
#include "ash/common/wm/maximize_mode/maximize_mode_controller.h"
#include "ash/common/wm/window_state.h"
@@ -201,29 +198,6 @@ void HandleRotateActiveWindow() {
}
}
-bool CanHandleShowMessageCenterBubble() {
- RootWindowController* controller =
- RootWindowController::ForTargetRootWindow();
- StatusAreaWidget* status_area_widget =
- controller->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"));
- RootWindowController* controller =
- RootWindowController::ForTargetRootWindow();
- StatusAreaWidget* status_area_widget =
- controller->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 HandleShowSystemTrayBubble() {
base::RecordAction(UserMetricsAction("Accel_Show_System_Tray_Bubble"));
RootWindowController* controller =
@@ -408,8 +382,6 @@ bool AcceleratorControllerDelegateAura::CanPerformAction(
case SCALE_UI_RESET:
case SCALE_UI_UP:
return accelerators::IsInternalDisplayZoomEnabled();
- case SHOW_MESSAGE_CENTER_BUBBLE:
- return CanHandleShowMessageCenterBubble();
case UNPIN:
return CanHandleUnpin();
@@ -494,9 +466,6 @@ void AcceleratorControllerDelegateAura::PerformAction(
case SCALE_UI_UP:
accelerators::ZoomInternalDisplay(true /* up */);
break;
- case SHOW_MESSAGE_CENTER_BUBBLE:
- HandleShowMessageCenterBubble();
- break;
case SHOW_SYSTEM_TRAY_BUBBLE:
HandleShowSystemTrayBubble();
break;
« no previous file with comments | « no previous file | ash/aura/wm_root_window_controller_aura.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698