OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 UI_AURA_SHELL_WINDOW_UTIL_H_ | 5 #ifndef UI_AURA_SHELL_WINDOW_UTIL_H_ |
6 #define UI_AURA_SHELL_WINDOW_UTIL_H_ | 6 #define UI_AURA_SHELL_WINDOW_UTIL_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "ui/aura_shell/aura_shell_export.h" | 9 #include "ui/aura_shell/aura_shell_export.h" |
10 | 10 |
11 namespace aura { | 11 namespace aura { |
12 class Window; | 12 class Window; |
13 } | 13 } |
14 | 14 |
15 namespace aura_shell { | 15 namespace aura_shell { |
16 | 16 |
| 17 // TODO(jamescook): Put all these functions in namespace window_util. |
| 18 |
17 // Returns true if |window| is in the maximized state. | 19 // Returns true if |window| is in the maximized state. |
18 AURA_SHELL_EXPORT bool IsWindowMaximized(aura::Window* window); | 20 AURA_SHELL_EXPORT bool IsWindowMaximized(aura::Window* window); |
19 | 21 |
20 // Convenience setters/getters for |aura::kRootWindowActiveWindow|. | 22 // Convenience setters/getters for |aura::kRootWindowActiveWindow|. |
21 AURA_SHELL_EXPORT void ActivateWindow(aura::Window* window); | 23 AURA_SHELL_EXPORT void ActivateWindow(aura::Window* window); |
22 AURA_SHELL_EXPORT void DeactivateWindow(aura::Window* window); | 24 AURA_SHELL_EXPORT void DeactivateWindow(aura::Window* window); |
23 AURA_SHELL_EXPORT bool IsActiveWindow(aura::Window* window); | 25 AURA_SHELL_EXPORT bool IsActiveWindow(aura::Window* window); |
24 AURA_SHELL_EXPORT aura::Window* GetActiveWindow(); | 26 AURA_SHELL_EXPORT aura::Window* GetActiveWindow(); |
25 | 27 |
26 // Retrieves the activatable window for |window|. If |window| is activatable, | 28 // Retrieves the activatable window for |window|. If |window| is activatable, |
27 // this will just return it, otherwise it will climb the parent/transient parent | 29 // this will just return it, otherwise it will climb the parent/transient parent |
28 // chain looking for a window that is activatable, per the ActivationController. | 30 // chain looking for a window that is activatable, per the ActivationController. |
29 // If you're looking for a function to get the activatable "top level" window, | 31 // If you're looking for a function to get the activatable "top level" window, |
30 // this is probably what you're looking for. | 32 // this is probably what you're looking for. |
31 AURA_SHELL_EXPORT aura::Window* GetActivatableWindow(aura::Window* window); | 33 AURA_SHELL_EXPORT aura::Window* GetActivatableWindow(aura::Window* window); |
32 | 34 |
| 35 // Update window bounds based on a change in show state. |
| 36 AURA_SHELL_EXPORT void UpdateBoundsFromShowState(aura::Window* window); |
| 37 |
33 } // namespace aura_shell | 38 } // namespace aura_shell |
34 | 39 |
35 #endif // UI_AURA_SHELL_WINDOW_UTIL_H_ | 40 #endif // UI_AURA_SHELL_WINDOW_UTIL_H_ |
OLD | NEW |