| 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/aura/wm_window_aura.h" | 10 #include "ash/aura/wm_window_aura.h" |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 } | 51 } |
| 52 | 52 |
| 53 aura::Window* GetActivatableWindow(aura::Window* window) { | 53 aura::Window* GetActivatableWindow(aura::Window* window) { |
| 54 return ::wm::GetActivatableWindow(window); | 54 return ::wm::GetActivatableWindow(window); |
| 55 } | 55 } |
| 56 | 56 |
| 57 bool CanActivateWindow(aura::Window* window) { | 57 bool CanActivateWindow(aura::Window* window) { |
| 58 return ::wm::CanActivateWindow(window); | 58 return ::wm::CanActivateWindow(window); |
| 59 } | 59 } |
| 60 | 60 |
| 61 bool IsWindowMinimized(aura::Window* window) { | |
| 62 return ash::wm::GetWindowState(window)->IsMinimized(); | |
| 63 } | |
| 64 | |
| 65 bool IsWindowUserPositionable(aura::Window* window) { | 61 bool IsWindowUserPositionable(aura::Window* window) { |
| 66 return GetWindowState(window)->IsUserPositionable(); | 62 return GetWindowState(window)->IsUserPositionable(); |
| 67 } | 63 } |
| 68 | 64 |
| 69 void CenterWindow(aura::Window* window) { | 65 void CenterWindow(aura::Window* window) { |
| 70 wm::WMEvent event(wm::WM_EVENT_CENTER); | 66 wm::WMEvent event(wm::WM_EVENT_CENTER); |
| 71 wm::GetWindowState(window)->OnWMEvent(&event); | 67 wm::GetWindowState(window)->OnWMEvent(&event); |
| 72 } | 68 } |
| 73 | 69 |
| 74 bool MoveWindowToEventRoot(aura::Window* window, const ui::Event& event) { | 70 bool MoveWindowToEventRoot(aura::Window* window, const ui::Event& event) { |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 116 if (!container->layout_manager()) | 112 if (!container->layout_manager()) |
| 117 container->SetLayoutManager(new SnapToPixelLayoutManager(container)); | 113 container->SetLayoutManager(new SnapToPixelLayoutManager(container)); |
| 118 } else { | 114 } else { |
| 119 InstallSnapLayoutManagerToContainers(container); | 115 InstallSnapLayoutManagerToContainers(container); |
| 120 } | 116 } |
| 121 } | 117 } |
| 122 } | 118 } |
| 123 | 119 |
| 124 } // namespace wm | 120 } // namespace wm |
| 125 } // namespace ash | 121 } // namespace ash |
| OLD | NEW |