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_WM_CORE_WINDOW_UTIL_H_ | 5 #ifndef UI_WM_CORE_WINDOW_UTIL_H_ |
6 #define UI_WM_CORE_WINDOW_UTIL_H_ | 6 #define UI_WM_CORE_WINDOW_UTIL_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
55 // | 55 // |
56 // As a result of this |root| has freshly created layers, meaning the layers | 56 // As a result of this |root| has freshly created layers, meaning the layers |
57 // have not yet been painted to. | 57 // have not yet been painted to. |
58 // | 58 // |
59 // When a non null |delegate_factory| is passed, it will be used to | 59 // When a non null |delegate_factory| is passed, it will be used to |
60 // create a delegate for an old layer which had its own delegate. | 60 // create a delegate for an old layer which had its own delegate. |
61 WM_EXPORT std::unique_ptr<ui::LayerTreeOwner> RecreateLayers( | 61 WM_EXPORT std::unique_ptr<ui::LayerTreeOwner> RecreateLayers( |
62 ui::LayerOwner* root, | 62 ui::LayerOwner* root, |
63 LayerDelegateFactory* delegate_factory); | 63 LayerDelegateFactory* delegate_factory); |
64 | 64 |
| 65 // Returns a layer tree that mirrors |root|. Used for live window previews. |
| 66 WM_EXPORT std::unique_ptr<ui::LayerTreeOwner> MirrorLayers( |
| 67 ui::LayerOwner* root, |
| 68 LayerDelegateFactory* delegate_factory); |
| 69 |
65 // Convenience functions that get the TransientWindowManager for the window and | 70 // Convenience functions that get the TransientWindowManager for the window and |
66 // redirect appropriately. These are preferable to calling functions on | 71 // redirect appropriately. These are preferable to calling functions on |
67 // TransientWindowManager as they handle the appropriate NULL checks. | 72 // TransientWindowManager as they handle the appropriate NULL checks. |
68 WM_EXPORT aura::Window* GetTransientParent(aura::Window* window); | 73 WM_EXPORT aura::Window* GetTransientParent(aura::Window* window); |
69 WM_EXPORT const aura::Window* GetTransientParent( | 74 WM_EXPORT const aura::Window* GetTransientParent( |
70 const aura::Window* window); | 75 const aura::Window* window); |
71 WM_EXPORT const std::vector<aura::Window*>& GetTransientChildren( | 76 WM_EXPORT const std::vector<aura::Window*>& GetTransientChildren( |
72 const aura::Window* window); | 77 const aura::Window* window); |
73 WM_EXPORT void AddTransientChild(aura::Window* parent, aura::Window* child); | 78 WM_EXPORT void AddTransientChild(aura::Window* parent, aura::Window* child); |
74 WM_EXPORT void RemoveTransientChild(aura::Window* parent, aura::Window* child); | 79 WM_EXPORT void RemoveTransientChild(aura::Window* parent, aura::Window* child); |
75 | 80 |
76 // Returns true if |window| has |ancestor| as a transient ancestor. A transient | 81 // Returns true if |window| has |ancestor| as a transient ancestor. A transient |
77 // ancestor is found by following the transient parent chain of the window. | 82 // ancestor is found by following the transient parent chain of the window. |
78 WM_EXPORT bool HasTransientAncestor(const aura::Window* window, | 83 WM_EXPORT bool HasTransientAncestor(const aura::Window* window, |
79 const aura::Window* ancestor); | 84 const aura::Window* ancestor); |
80 | 85 |
81 } // namespace wm | 86 } // namespace wm |
82 | 87 |
83 #endif // UI_WM_CORE_WINDOW_UTIL_H_ | 88 #endif // UI_WM_CORE_WINDOW_UTIL_H_ |
OLD | NEW |