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

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

Issue 2736573002: chromeos: Move files in //ash/common to //ash, part 2 (Closed)
Patch Set: 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.h ('k') | ash/common/accelerators/accelerator_controller.h » ('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
deleted file mode 100644
index 3fe7d171049f4883c033501f72c00eb0528f2634..0000000000000000000000000000000000000000
--- a/ash/common/accelerators/accelerator_commands.cc
+++ /dev/null
@@ -1,53 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/common/accelerators/accelerator_commands.h"
-
-#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 "base/metrics/user_metrics.h"
-
-namespace ash {
-namespace accelerators {
-
-bool ToggleMinimized() {
- WmWindow* window = WmShell::Get()->GetActiveWindow();
- // Attempt to restore the window that would be cycled through next from
- // the launcher when there is no active window.
- if (!window) {
- MruWindowTracker::WindowList mru_windows(
- WmShell::Get()->mru_window_tracker()->BuildMruWindowList());
- if (!mru_windows.empty())
- mru_windows.front()->GetWindowState()->Activate();
- return true;
- }
- wm::WindowState* window_state = window->GetWindowState();
- if (!window_state->CanMinimize())
- return false;
- window_state->Minimize();
- return true;
-}
-
-void ToggleMaximized() {
- WmWindow* active_window = WmShell::Get()->GetActiveWindow();
- if (!active_window)
- return;
- base::RecordAction(base::UserMetricsAction("Accel_Toggle_Maximized"));
- wm::WMEvent event(wm::WM_EVENT_TOGGLE_MAXIMIZE);
- active_window->GetWindowState()->OnWMEvent(&event);
-}
-
-void ToggleFullscreen() {
- WmWindow* active_window = WmShell::Get()->GetActiveWindow();
- if (!active_window)
- return;
- const wm::WMEvent event(wm::WM_EVENT_TOGGLE_FULLSCREEN);
- active_window->GetWindowState()->OnWMEvent(&event);
-}
-
-} // namespace accelerators
-} // namespace ash
« no previous file with comments | « ash/common/accelerators/accelerator_commands.h ('k') | ash/common/accelerators/accelerator_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698