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

Unified Diff: ui/aura_shell/window_util.cc

Issue 9035001: Move some more WM functionality down into ash. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years 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 | « ui/aura_shell/window_util.h ('k') | ui/aura_shell/workspace/workspace.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/aura_shell/window_util.cc
===================================================================
--- ui/aura_shell/window_util.cc (revision 115655)
+++ ui/aura_shell/window_util.cc (working copy)
@@ -1,69 +0,0 @@
-// Copyright (c) 2011 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 "ui/aura_shell/window_util.h"
-
-#include "ash/wm/activation_controller.h"
-#include "ui/aura/client/activation_client.h"
-#include "ui/aura/client/aura_constants.h"
-#include "ui/aura/root_window.h"
-#include "ui/aura/window.h"
-#include "ui/aura_shell/property_util.h"
-#include "ui/base/ui_base_types.h"
-#include "ui/gfx/screen.h"
-
-namespace aura_shell {
-
-bool IsWindowMaximized(aura::Window* window) {
- return window->GetIntProperty(aura::client::kShowStateKey) ==
- ui::SHOW_STATE_MAXIMIZED;
-}
-
-void ActivateWindow(aura::Window* window) {
- aura::client::GetActivationClient()->ActivateWindow(window);
-}
-
-void DeactivateWindow(aura::Window* window) {
- aura::client::GetActivationClient()->DeactivateWindow(window);
-}
-
-bool IsActiveWindow(aura::Window* window) {
- return GetActiveWindow() == window;
-}
-
-aura::Window* GetActiveWindow() {
- return aura::client::GetActivationClient()->GetActiveWindow();
-}
-
-aura::Window* GetActivatableWindow(aura::Window* window) {
- return internal::ActivationController::GetActivatableWindow(window);
-}
-
-void UpdateBoundsFromShowState(aura::Window* window) {
- switch (window->GetIntProperty(aura::client::kShowStateKey)) {
- case ui::SHOW_STATE_NORMAL: {
- const gfx::Rect* restore = GetRestoreBounds(window);
- window->SetProperty(aura::client::kRestoreBoundsKey, NULL);
- if (restore)
- window->SetBounds(*restore);
- delete restore;
- break;
- }
-
- case ui::SHOW_STATE_MAXIMIZED:
- SetRestoreBoundsIfNotSet(window);
- window->SetBounds(gfx::Screen::GetMonitorWorkAreaNearestWindow(window));
- break;
-
- case ui::SHOW_STATE_FULLSCREEN:
- SetRestoreBoundsIfNotSet(window);
- window->SetBounds(gfx::Screen::GetMonitorAreaNearestWindow(window));
- break;
-
- default:
- break;
- }
-}
-
-} // namespace aura_shell
« no previous file with comments | « ui/aura_shell/window_util.h ('k') | ui/aura_shell/workspace/workspace.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698