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 Window; | 12 class Window; |
13 } | 13 } |
14 | 14 |
15 namespace ash { | 15 namespace ash { |
16 namespace wm { | 16 namespace wm { |
17 | 17 |
18 // Convenience setters/getters for |aura::client::kRootWindowActiveWindow|. | 18 // Convenience setters/getters for |aura::client::kRootWindowActiveWindow|. |
19 ASH_EXPORT void ActivateWindow(aura::Window* window); | 19 ASH_EXPORT void ActivateWindow(aura::Window* window); |
20 ASH_EXPORT void DeactivateWindow(aura::Window* window); | 20 ASH_EXPORT void DeactivateWindow(aura::Window* window); |
21 ASH_EXPORT bool IsActiveWindow(aura::Window* window); | 21 ASH_EXPORT bool IsActiveWindow(aura::Window* window); |
22 ASH_EXPORT aura::Window* GetActiveWindow(); | 22 ASH_EXPORT aura::Window* GetActiveWindow(); |
| 23 ASH_EXPORT bool CanActivateWindow(aura::Window* window); |
23 | 24 |
24 // Retrieves the activatable window for |window|. If |window| is activatable, | 25 // Retrieves the activatable window for |window|. If |window| is activatable, |
25 // this will just return it, otherwise it will climb the parent/transient parent | 26 // this will just return it, otherwise it will climb the parent/transient parent |
26 // chain looking for a window that is activatable, per the ActivationController. | 27 // chain looking for a window that is activatable, per the ActivationController. |
27 // If you're looking for a function to get the activatable "top level" window, | 28 // If you're looking for a function to get the activatable "top level" window, |
28 // this is probably what you're looking for. | 29 // this is probably what you're looking for. |
29 ASH_EXPORT aura::Window* GetActivatableWindow(aura::Window* window); | 30 ASH_EXPORT aura::Window* GetActivatableWindow(aura::Window* window); |
30 | 31 |
31 // Returns true if |window| is normal or default. | 32 // Returns true if |window| is normal or default. |
32 ASH_EXPORT bool IsWindowNormal(aura::Window* window); | 33 ASH_EXPORT bool IsWindowNormal(aura::Window* window); |
(...skipping 15 matching lines...) Expand all Loading... |
48 | 49 |
49 // Sets whether the window should be open in a split mode. Only applicable when | 50 // Sets whether the window should be open in a split mode. Only applicable when |
50 // workspaces are used. | 51 // workspaces are used. |
51 ASH_EXPORT void SetOpenWindowSplit(aura::Window* window, bool value); | 52 ASH_EXPORT void SetOpenWindowSplit(aura::Window* window, bool value); |
52 ASH_EXPORT bool GetOpenWindowSplit(aura::Window* window); | 53 ASH_EXPORT bool GetOpenWindowSplit(aura::Window* window); |
53 | 54 |
54 } // namespace wm | 55 } // namespace wm |
55 } // namespace ash | 56 } // namespace ash |
56 | 57 |
57 #endif // ASH_WM_WINDOW_UTIL_H_ | 58 #endif // ASH_WM_WINDOW_UTIL_H_ |
OLD | NEW |