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

Unified Diff: ash/accelerators/accelerator_controller.cc

Issue 2886253002: mash: remove more shell/shelf WmWindow usage. (Closed)
Patch Set: Fix WmShelf::ForWindow. Created 3 years, 7 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/exit_warning_handler.cc » ('j') | no next file with comments »
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 46e3dab419a7e2bc12d119bad30ddf3d2adb6fe4..6b9336da3fde20273256ac2106206f2e81a27fc4 100644
--- a/ash/accelerators/accelerator_controller.cc
+++ b/ash/accelerators/accelerator_controller.cc
@@ -204,8 +204,8 @@ void HandleRotatePaneFocus(FocusCycler::Direction direction) {
void HandleFocusShelf() {
base::RecordAction(UserMetricsAction("Accel_Focus_Shelf"));
- // TODO(jamescook): Should this be GetWmRootWindowForNewWindows()?
- WmShelf* shelf = WmShelf::ForWindow(ShellPort::Get()->GetPrimaryRootWindow());
+ // TODO(jamescook): Should this be GetRootWindowForNewWindows()?
+ WmShelf* shelf = WmShelf::ForWindow(Shell::GetPrimaryRootWindow());
Shell::Get()->focus_cycler()->FocusWidget(shelf->shelf_widget());
}
@@ -317,7 +317,7 @@ void HandleShowKeyboardOverlay() {
}
bool CanHandleShowMessageCenterBubble() {
- WmWindow* target_root = Shell::GetWmRootWindowForNewWindows();
+ aura::Window* target_root = Shell::GetRootWindowForNewWindows();
StatusAreaWidget* status_area_widget =
WmShelf::ForWindow(target_root)->shelf_widget()->status_area_widget();
return status_area_widget &&
@@ -326,7 +326,7 @@ bool CanHandleShowMessageCenterBubble() {
void HandleShowMessageCenterBubble() {
base::RecordAction(UserMetricsAction("Accel_Show_Message_Center_Bubble"));
- WmWindow* target_root = Shell::GetWmRootWindowForNewWindows();
+ aura::Window* target_root = Shell::GetRootWindowForNewWindows();
StatusAreaWidget* status_area_widget =
WmShelf::ForWindow(target_root)->shelf_widget()->status_area_widget();
if (status_area_widget) {
@@ -339,8 +339,8 @@ void HandleShowMessageCenterBubble() {
void HandleShowSystemTrayBubble() {
base::RecordAction(UserMetricsAction("Accel_Show_System_Tray_Bubble"));
- WmWindow* target_root = Shell::GetWmRootWindowForNewWindows();
- SystemTray* tray = target_root->GetRootWindowController()->GetSystemTray();
+ aura::Window* target_root = Shell::GetRootWindowForNewWindows();
+ SystemTray* tray = GetRootWindowController(target_root)->GetSystemTray();
if (!tray->HasSystemBubble()) {
tray->ShowDefaultView(BUBBLE_CREATE_NEW);
tray->ActivateBubble();
@@ -445,8 +445,7 @@ void HandleShowImeMenuBubble() {
base::RecordAction(UserMetricsAction("Accel_Show_Ime_Menu_Bubble"));
StatusAreaWidget* status_area_widget =
- WmShelf::ForWindow(ShellPort::Get()->GetPrimaryRootWindow())
- ->GetStatusAreaWidget();
+ WmShelf::ForWindow(Shell::GetPrimaryRootWindow())->GetStatusAreaWidget();
if (status_area_widget) {
ImeMenuTray* ime_menu_tray = status_area_widget->ime_menu_tray();
if (ime_menu_tray && ime_menu_tray->visible() &&
@@ -507,8 +506,7 @@ void HandleLock() {
void HandleShowStylusTools() {
base::RecordAction(UserMetricsAction("Accel_Show_Stylus_Tools"));
- Shell::GetWmRootWindowForNewWindows()
- ->GetRootWindowController()
+ GetRootWindowController(Shell::GetRootWindowForNewWindows())
->GetShelf()
->GetStatusAreaWidget()
->palette_tray()
« no previous file with comments | « no previous file | ash/accelerators/exit_warning_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698