| 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 #ifndef ASH_WM_WINDOW_UTIL_H_ | 5 #ifndef ASH_WM_WINDOW_UTIL_H_ |
| 6 #define ASH_WM_WINDOW_UTIL_H_ | 6 #define ASH_WM_WINDOW_UTIL_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "ash/ash_export.h" | 9 #include "ash/ash_export.h" |
| 10 | 10 |
| 11 namespace aura { | 11 namespace aura { |
| 12 class RootWindow; |
| 12 class Window; | 13 class Window; |
| 13 } | 14 } |
| 14 | 15 |
| 15 namespace ash { | 16 namespace ash { |
| 17 namespace internal { |
| 18 class RootWindowController; |
| 19 } |
| 16 namespace wm { | 20 namespace wm { |
| 17 | 21 |
| 18 // Convenience setters/getters for |aura::client::kRootWindowActiveWindow|. | 22 // Convenience setters/getters for |aura::client::kRootWindowActiveWindow|. |
| 19 ASH_EXPORT void ActivateWindow(aura::Window* window); | 23 ASH_EXPORT void ActivateWindow(aura::Window* window); |
| 20 ASH_EXPORT void DeactivateWindow(aura::Window* window); | 24 ASH_EXPORT void DeactivateWindow(aura::Window* window); |
| 21 ASH_EXPORT bool IsActiveWindow(aura::Window* window); | 25 ASH_EXPORT bool IsActiveWindow(aura::Window* window); |
| 22 ASH_EXPORT aura::Window* GetActiveWindow(); | 26 ASH_EXPORT aura::Window* GetActiveWindow(); |
| 23 ASH_EXPORT bool CanActivateWindow(aura::Window* window); | 27 ASH_EXPORT bool CanActivateWindow(aura::Window* window); |
| 28 ASH_EXPORT internal::RootWindowController* GetRootWindowController( |
| 29 aura::RootWindow* root_window); |
| 24 | 30 |
| 25 // Retrieves the activatable window for |window|. If |window| is activatable, | 31 // Retrieves the activatable window for |window|. If |window| is activatable, |
| 26 // this will just return it, otherwise it will climb the parent/transient parent | 32 // this will just return it, otherwise it will climb the parent/transient parent |
| 27 // chain looking for a window that is activatable, per the ActivationController. | 33 // chain looking for a window that is activatable, per the ActivationController. |
| 28 // If you're looking for a function to get the activatable "top level" window, | 34 // If you're looking for a function to get the activatable "top level" window, |
| 29 // this is probably what you're looking for. | 35 // this is probably what you're looking for. |
| 30 ASH_EXPORT aura::Window* GetActivatableWindow(aura::Window* window); | 36 ASH_EXPORT aura::Window* GetActivatableWindow(aura::Window* window); |
| 31 | 37 |
| 32 // Returns true if |window| is normal or default. | 38 // Returns true if |window| is normal or default. |
| 33 ASH_EXPORT bool IsWindowNormal(aura::Window* window); | 39 ASH_EXPORT bool IsWindowNormal(aura::Window* window); |
| (...skipping 16 matching lines...) Expand all Loading... |
| 50 // Restores |window|, which must not be NULL. | 56 // Restores |window|, which must not be NULL. |
| 51 ASH_EXPORT void RestoreWindow(aura::Window* window); | 57 ASH_EXPORT void RestoreWindow(aura::Window* window); |
| 52 | 58 |
| 53 // Moves the window to the center of the monitor. | 59 // Moves the window to the center of the monitor. |
| 54 ASH_EXPORT void CenterWindow(aura::Window* window); | 60 ASH_EXPORT void CenterWindow(aura::Window* window); |
| 55 | 61 |
| 56 } // namespace wm | 62 } // namespace wm |
| 57 } // namespace ash | 63 } // namespace ash |
| 58 | 64 |
| 59 #endif // ASH_WM_WINDOW_UTIL_H_ | 65 #endif // ASH_WM_WINDOW_UTIL_H_ |
| OLD | NEW |