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

Unified Diff: ash/common/accelerators/accelerator_commands.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/aura/wm_shell_aura.cc ('k') | ash/common/accelerators/accelerator_controller.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/common/accelerators/accelerator_commands.cc
diff --git a/ash/common/accelerators/accelerator_commands.cc b/ash/common/accelerators/accelerator_commands.cc
index a5f05acaa07436a61132c93e84126a007011c0e1..6c2a8efa1a820fc302efca6a531190c46e2d2b06 100644
--- a/ash/common/accelerators/accelerator_commands.cc
+++ b/ash/common/accelerators/accelerator_commands.cc
@@ -7,16 +7,16 @@
#include "ash/common/wm/mru_window_tracker.h"
#include "ash/common/wm/window_state.h"
#include "ash/common/wm/wm_event.h"
-#include "ash/common/wm_shell.h"
#include "ash/common/wm_window.h"
#include "ash/shell.h"
+#include "ash/wm/window_util.h"
#include "base/metrics/user_metrics.h"
namespace ash {
namespace accelerators {
bool ToggleMinimized() {
- WmWindow* window = WmShell::Get()->GetActiveWindow();
+ WmWindow* window = WmWindow::Get(wm::GetActiveWindow());
// Attempt to restore the window that would be cycled through next from
// the launcher when there is no active window.
if (!window) {
@@ -34,7 +34,7 @@ bool ToggleMinimized() {
}
void ToggleMaximized() {
- WmWindow* active_window = WmShell::Get()->GetActiveWindow();
+ WmWindow* active_window = WmWindow::Get(wm::GetActiveWindow());
if (!active_window)
return;
base::RecordAction(base::UserMetricsAction("Accel_Toggle_Maximized"));
@@ -43,7 +43,7 @@ void ToggleMaximized() {
}
void ToggleFullscreen() {
- WmWindow* active_window = WmShell::Get()->GetActiveWindow();
+ WmWindow* active_window = WmWindow::Get(wm::GetActiveWindow());
if (!active_window)
return;
const wm::WMEvent event(wm::WM_EVENT_TOGGLE_FULLSCREEN);
« no previous file with comments | « ash/aura/wm_shell_aura.cc ('k') | ash/common/accelerators/accelerator_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698