| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "ash/wm/window_util.h" | 5 #include "ash/wm/window_util.h" |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "ash/ash_constants.h" | 9 #include "ash/ash_constants.h" |
| 10 #include "ash/root_window_controller.h" | 10 #include "ash/root_window_controller.h" |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 | 43 |
| 44 aura::Window* GetActiveWindow() { | 44 aura::Window* GetActiveWindow() { |
| 45 return aura::client::GetActivationClient(Shell::GetPrimaryRootWindow())-> | 45 return aura::client::GetActivationClient(Shell::GetPrimaryRootWindow())-> |
| 46 GetActiveWindow(); | 46 GetActiveWindow(); |
| 47 } | 47 } |
| 48 | 48 |
| 49 aura::Window* GetActivatableWindow(aura::Window* window) { | 49 aura::Window* GetActivatableWindow(aura::Window* window) { |
| 50 return views::corewm::GetActivatableWindow(window); | 50 return views::corewm::GetActivatableWindow(window); |
| 51 } | 51 } |
| 52 | 52 |
| 53 bool IsActiveWindowFullscreen() { | |
| 54 aura::Window* window = GetActiveWindow(); | |
| 55 while (window) { | |
| 56 if (window->GetProperty(aura::client::kShowStateKey) == | |
| 57 ui::SHOW_STATE_FULLSCREEN) { | |
| 58 return true; | |
| 59 } | |
| 60 window = window->parent(); | |
| 61 } | |
| 62 return false; | |
| 63 } | |
| 64 | |
| 65 bool CanActivateWindow(aura::Window* window) { | 53 bool CanActivateWindow(aura::Window* window) { |
| 66 return views::corewm::CanActivateWindow(window); | 54 return views::corewm::CanActivateWindow(window); |
| 67 } | 55 } |
| 68 | 56 |
| 69 bool CanMaximizeWindow(const aura::Window* window) { | 57 bool CanMaximizeWindow(const aura::Window* window) { |
| 70 return window->GetProperty(aura::client::kCanMaximizeKey); | 58 return window->GetProperty(aura::client::kCanMaximizeKey); |
| 71 } | 59 } |
| 72 | 60 |
| 73 bool CanMinimizeWindow(const aura::Window* window) { | 61 bool CanMinimizeWindow(const aura::Window* window) { |
| 74 internal::RootWindowController* controller = | 62 internal::RootWindowController* controller = |
| (...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 213 return false; | 201 return false; |
| 214 aura::Window* window_container = | 202 aura::Window* window_container = |
| 215 ash::Shell::GetContainer(target_root, window->parent()->id()); | 203 ash::Shell::GetContainer(target_root, window->parent()->id()); |
| 216 // Move the window to the target launcher. | 204 // Move the window to the target launcher. |
| 217 window_container->AddChild(window); | 205 window_container->AddChild(window); |
| 218 return true; | 206 return true; |
| 219 } | 207 } |
| 220 | 208 |
| 221 } // namespace wm | 209 } // namespace wm |
| 222 } // namespace ash | 210 } // namespace ash |
| OLD | NEW |