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

Unified Diff: ash/common/accelerators/accelerator_controller.cc

Issue 2787363002: Moves couple of WmShell methods to standalone functions (Closed)
Patch Set: feedback and fix applist Created 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/common/accelerators/accelerator_commands.cc ('k') | ash/common/accelerators/debug_commands.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/common/accelerators/accelerator_controller.cc
diff --git a/ash/common/accelerators/accelerator_controller.cc b/ash/common/accelerators/accelerator_controller.cc
index a1cf527d5d13f1d09d25b21f832b42c268fa30dd..a95f9f6f369d2b4e87ed728db3ca59f1b443c782 100644
--- a/ash/common/accelerators/accelerator_controller.cc
+++ b/ash/common/accelerators/accelerator_controller.cc
@@ -406,7 +406,7 @@ void HandleToggleOverview() {
}
bool CanHandleWindowSnap() {
- WmWindow* active_window = WmShell::Get()->GetActiveWindow();
+ WmWindow* active_window = WmWindow::Get(wm::GetActiveWindow());
if (!active_window)
return false;
wm::WindowState* window_state = active_window->GetWindowState();
@@ -425,7 +425,7 @@ void HandleWindowSnap(AcceleratorAction action) {
const wm::WMEvent event(action == WINDOW_CYCLE_SNAP_LEFT
? wm::WM_EVENT_CYCLE_SNAP_LEFT
: wm::WM_EVENT_CYCLE_SNAP_RIGHT);
- WmWindow* active_window = WmShell::Get()->GetActiveWindow();
+ WmWindow* active_window = WmWindow::Get(wm::GetActiveWindow());
DCHECK(active_window);
active_window->GetWindowState()->OnWMEvent(&event);
}
@@ -436,12 +436,12 @@ void HandleWindowMinimize() {
}
bool CanHandlePositionCenter() {
- return WmShell::Get()->GetActiveWindow() != nullptr;
+ return wm::GetActiveWindow() != nullptr;
}
void HandlePositionCenter() {
base::RecordAction(UserMetricsAction("Accel_Window_Position_Center"));
- wm::CenterWindow(WmShell::Get()->GetActiveWindow());
+ wm::CenterWindow(WmWindow::Get(wm::GetActiveWindow()));
}
void HandleShowImeMenuBubble() {
« no previous file with comments | « ash/common/accelerators/accelerator_commands.cc ('k') | ash/common/accelerators/debug_commands.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698