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 UI_VIEWS_COREWM_WINDOW_UTIL_H_ | 5 #ifndef UI_VIEWS_COREWM_WINDOW_UTIL_H_ |
6 #define UI_VIEWS_COREWM_WINDOW_UTIL_H_ | 6 #define UI_VIEWS_COREWM_WINDOW_UTIL_H_ |
7 | 7 |
| 8 #include <vector> |
| 9 |
8 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
9 #include "ui/views/views_export.h" | 11 #include "ui/views/views_export.h" |
10 | 12 |
11 namespace aura { | 13 namespace aura { |
12 class Window; | 14 class Window; |
13 } | 15 } |
14 | 16 |
15 namespace ui { | 17 namespace ui { |
16 class Layer; | 18 class Layer; |
17 } | 19 } |
(...skipping 22 matching lines...) Expand all Loading... |
40 // animations that want to animate between the existing visuals and a new window | 42 // animations that want to animate between the existing visuals and a new window |
41 // state. The caller owns the return value. | 43 // state. The caller owns the return value. |
42 // | 44 // |
43 // As a result of this |window| has freshly created layers, meaning the layers | 45 // As a result of this |window| has freshly created layers, meaning the layers |
44 // are all empty (nothing has been painted to them) and are sized to 0x0. Soon | 46 // are all empty (nothing has been painted to them) and are sized to 0x0. Soon |
45 // after this call you need to reset the bounds of the window. Or, you can pass | 47 // after this call you need to reset the bounds of the window. Or, you can pass |
46 // true as the second argument to let the function do that. | 48 // true as the second argument to let the function do that. |
47 VIEWS_EXPORT ui::Layer* RecreateWindowLayers(aura::Window* window, | 49 VIEWS_EXPORT ui::Layer* RecreateWindowLayers(aura::Window* window, |
48 bool set_bounds) WARN_UNUSED_RESULT; | 50 bool set_bounds) WARN_UNUSED_RESULT; |
49 | 51 |
| 52 // Convenience functions that get the TransientWindowManager for the window and |
| 53 // redirect appropriately. These are preferable to calling functions on |
| 54 // TransientWindowManager as they handle the appropriate NULL checks. |
| 55 VIEWS_EXPORT aura::Window* GetTransientParent(aura::Window* window); |
| 56 VIEWS_EXPORT const aura::Window* GetTransientParent(const aura::Window* window); |
| 57 VIEWS_EXPORT const std::vector<aura::Window*>& GetTransientChildren( |
| 58 const aura::Window* window); |
| 59 VIEWS_EXPORT void AddTransientChild(aura::Window* parent, aura::Window* child); |
| 60 VIEWS_EXPORT void RemoveTransientChild(aura::Window* parent, |
| 61 aura::Window* child); |
| 62 |
| 63 // Returns true if |window| has |ancestor| as a transient ancestor. A transient |
| 64 // ancestor is found by following the transient parent chain of the window. |
| 65 VIEWS_EXPORT bool HasTransientAncestor(const aura::Window* window, |
| 66 const aura::Window* ancestor); |
| 67 |
50 } // namespace corewm | 68 } // namespace corewm |
51 } // namespace views | 69 } // namespace views |
52 | 70 |
53 #endif // UI_VIEWS_COREWM_WINDOW_UTIL_H_ | 71 #endif // UI_VIEWS_COREWM_WINDOW_UTIL_H_ |
OLD | NEW |