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 <vector> | 9 #include <vector> |
9 | 10 |
10 #include "base/compiler_specific.h" | 11 #include "base/compiler_specific.h" |
11 #include "base/memory/scoped_ptr.h" | |
12 #include "ui/wm/wm_export.h" | 12 #include "ui/wm/wm_export.h" |
13 | 13 |
14 namespace aura { | 14 namespace aura { |
15 class Window; | 15 class Window; |
16 } | 16 } |
17 | 17 |
18 namespace ui { | 18 namespace ui { |
19 class Layer; | 19 class Layer; |
20 class LayerOwner; | 20 class LayerOwner; |
21 class LayerTreeOwner; | 21 class LayerTreeOwner; |
(...skipping 13 matching lines...) Expand all Loading... |
35 // Retrieves the toplevel window for |window|. The ActivationClient makes this | 35 // Retrieves the toplevel window for |window|. The ActivationClient makes this |
36 // determination. | 36 // determination. |
37 WM_EXPORT aura::Window* GetToplevelWindow(aura::Window* window); | 37 WM_EXPORT aura::Window* GetToplevelWindow(aura::Window* window); |
38 | 38 |
39 // Returns the existing Layer for |root| (and all its descendants) and creates | 39 // Returns the existing Layer for |root| (and all its descendants) and creates |
40 // a new layer for |root| and all its descendants. This is intended for | 40 // a new layer for |root| and all its descendants. This is intended for |
41 // animations that want to animate between the existing visuals and a new state. | 41 // animations that want to animate between the existing visuals and a new state. |
42 // | 42 // |
43 // As a result of this |root| has freshly created layers, meaning the layers | 43 // As a result of this |root| has freshly created layers, meaning the layers |
44 // have not yet been painted to. | 44 // have not yet been painted to. |
45 WM_EXPORT scoped_ptr<ui::LayerTreeOwner> RecreateLayers( | 45 WM_EXPORT std::unique_ptr<ui::LayerTreeOwner> RecreateLayers( |
46 ui::LayerOwner* root); | 46 ui::LayerOwner* root); |
47 | 47 |
48 // Convenience functions that get the TransientWindowManager for the window and | 48 // Convenience functions that get the TransientWindowManager for the window and |
49 // redirect appropriately. These are preferable to calling functions on | 49 // redirect appropriately. These are preferable to calling functions on |
50 // TransientWindowManager as they handle the appropriate NULL checks. | 50 // TransientWindowManager as they handle the appropriate NULL checks. |
51 WM_EXPORT aura::Window* GetTransientParent(aura::Window* window); | 51 WM_EXPORT aura::Window* GetTransientParent(aura::Window* window); |
52 WM_EXPORT const aura::Window* GetTransientParent( | 52 WM_EXPORT const aura::Window* GetTransientParent( |
53 const aura::Window* window); | 53 const aura::Window* window); |
54 WM_EXPORT const std::vector<aura::Window*>& GetTransientChildren( | 54 WM_EXPORT const std::vector<aura::Window*>& GetTransientChildren( |
55 const aura::Window* window); | 55 const aura::Window* window); |
56 WM_EXPORT void AddTransientChild(aura::Window* parent, aura::Window* child); | 56 WM_EXPORT void AddTransientChild(aura::Window* parent, aura::Window* child); |
57 WM_EXPORT void RemoveTransientChild(aura::Window* parent, aura::Window* child); | 57 WM_EXPORT void RemoveTransientChild(aura::Window* parent, aura::Window* child); |
58 | 58 |
59 // Returns true if |window| has |ancestor| as a transient ancestor. A transient | 59 // Returns true if |window| has |ancestor| as a transient ancestor. A transient |
60 // ancestor is found by following the transient parent chain of the window. | 60 // ancestor is found by following the transient parent chain of the window. |
61 WM_EXPORT bool HasTransientAncestor(const aura::Window* window, | 61 WM_EXPORT bool HasTransientAncestor(const aura::Window* window, |
62 const aura::Window* ancestor); | 62 const aura::Window* ancestor); |
63 | 63 |
64 } // namespace wm | 64 } // namespace wm |
65 | 65 |
66 #endif // UI_WM_CORE_WINDOW_UTIL_H_ | 66 #endif // UI_WM_CORE_WINDOW_UTIL_H_ |
OLD | NEW |