| 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 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 <set> | 9 #include <set> |
| 10 | 10 |
| 11 #include "ash/ash_export.h" | 11 #include "ash/ash_export.h" |
| 12 | 12 |
| 13 namespace aura { | 13 namespace aura { |
| 14 class Window; | 14 class Window; |
| 15 } | 15 } |
| 16 | 16 |
| 17 namespace aura_shell { | 17 namespace ash { |
| 18 | 18 |
| 19 // TODO(jamescook): Put all these functions in namespace window_util. | 19 // TODO(jamescook): Put all these functions in namespace window_util. |
| 20 | 20 |
| 21 // Returns true if |window| is in the maximized state. | 21 // Returns true if |window| is in the maximized state. |
| 22 ASH_EXPORT bool IsWindowMaximized(aura::Window* window); | 22 ASH_EXPORT bool IsWindowMaximized(aura::Window* window); |
| 23 | 23 |
| 24 // Convenience setters/getters for |aura::client::kRootWindowActiveWindow|. | 24 // Convenience setters/getters for |aura::client::kRootWindowActiveWindow|. |
| 25 ASH_EXPORT void ActivateWindow(aura::Window* window); | 25 ASH_EXPORT void ActivateWindow(aura::Window* window); |
| 26 ASH_EXPORT void DeactivateWindow(aura::Window* window); | 26 ASH_EXPORT void DeactivateWindow(aura::Window* window); |
| 27 ASH_EXPORT bool IsActiveWindow(aura::Window* window); | 27 ASH_EXPORT bool IsActiveWindow(aura::Window* window); |
| 28 ASH_EXPORT aura::Window* GetActiveWindow(); | 28 ASH_EXPORT aura::Window* GetActiveWindow(); |
| 29 | 29 |
| 30 // Retrieves the activatable window for |window|. If |window| is activatable, | 30 // Retrieves the activatable window for |window|. If |window| is activatable, |
| 31 // this will just return it, otherwise it will climb the parent/transient parent | 31 // this will just return it, otherwise it will climb the parent/transient parent |
| 32 // chain looking for a window that is activatable, per the ActivationController. | 32 // chain looking for a window that is activatable, per the ActivationController. |
| 33 // If you're looking for a function to get the activatable "top level" window, | 33 // If you're looking for a function to get the activatable "top level" window, |
| 34 // this is probably what you're looking for. | 34 // this is probably what you're looking for. |
| 35 ASH_EXPORT aura::Window* GetActivatableWindow(aura::Window* window); | 35 ASH_EXPORT aura::Window* GetActivatableWindow(aura::Window* window); |
| 36 | 36 |
| 37 // Update window bounds based on a change in show state. | 37 // Update window bounds based on a change in show state. |
| 38 ASH_EXPORT void UpdateBoundsFromShowState(aura::Window* window); | 38 ASH_EXPORT void UpdateBoundsFromShowState(aura::Window* window); |
| 39 | 39 |
| 40 // Returns true if the set of |windows| contains a full-screen window. | 40 // Returns true if the set of |windows| contains a full-screen window. |
| 41 typedef std::set<aura::Window*> WindowSet; | 41 typedef std::set<aura::Window*> WindowSet; |
| 42 ASH_EXPORT bool HasFullscreenWindow(const WindowSet& windows); | 42 ASH_EXPORT bool HasFullscreenWindow(const WindowSet& windows); |
| 43 | 43 |
| 44 } // namespace aura_shell | 44 } // namespace ash |
| 45 | 45 |
| 46 #endif // ASH_WM_WINDOW_UTIL_H_ | 46 #endif // ASH_WM_WINDOW_UTIL_H_ |
| OLD | NEW |