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 23 matching lines...) Expand all Loading... |
34 WM_EXPORT aura::Window* GetActivatableWindow(aura::Window* window); | 34 WM_EXPORT aura::Window* GetActivatableWindow(aura::Window* window); |
35 | 35 |
36 // Retrieves the toplevel window for |window|. The ActivationClient makes this | 36 // Retrieves the toplevel window for |window|. The ActivationClient makes this |
37 // determination. | 37 // determination. |
38 WM_EXPORT aura::Window* GetToplevelWindow(aura::Window* window); | 38 WM_EXPORT aura::Window* GetToplevelWindow(aura::Window* window); |
39 | 39 |
40 // A factory method to create a delegate for recreated layers. | 40 // A factory method to create a delegate for recreated layers. |
41 class WM_EXPORT LayerDelegateFactory { | 41 class WM_EXPORT LayerDelegateFactory { |
42 public: | 42 public: |
43 virtual ~LayerDelegateFactory() = default; | 43 virtual ~LayerDelegateFactory() = default; |
44 // |original_delegate| may already be deleted by the time the new | 44 // |original_layer| may already be deleted by the time the new |
45 // delegate is created, so if the new delegate has to access it | 45 // delegate is created, so if the new delegate has to access it |
46 // later, it is the new delegate's responsibility to make sure the | 46 // later, it is the new delegate's responsibility to make sure the |
47 // original delegate is alive. | 47 // original layer/delegate is alive. |
48 virtual ui::LayerDelegate* CreateDelegate( | 48 virtual ui::LayerDelegate* CreateDelegate(ui::Layer* new_layer, |
49 ui::LayerDelegate* original_delegate) = 0; | 49 ui::Layer* original_layer) = 0; |
50 }; | 50 }; |
51 | 51 |
52 // Returns the existing Layer for |root| (and all its descendants) and creates | 52 // Returns the existing Layer for |root| (and all its descendants) and creates |
53 // a new layer for |root| and all its descendants. This is intended for | 53 // a new layer for |root| and all its descendants. This is intended for |
54 // animations that want to animate between the existing visuals and a new state. | 54 // animations that want to animate between the existing visuals and a new state. |
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 |
(...skipping 14 matching lines...) Expand all Loading... |
74 WM_EXPORT void RemoveTransientChild(aura::Window* parent, aura::Window* child); | 74 WM_EXPORT void RemoveTransientChild(aura::Window* parent, aura::Window* child); |
75 | 75 |
76 // Returns true if |window| has |ancestor| as a transient ancestor. A transient | 76 // 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. | 77 // ancestor is found by following the transient parent chain of the window. |
78 WM_EXPORT bool HasTransientAncestor(const aura::Window* window, | 78 WM_EXPORT bool HasTransientAncestor(const aura::Window* window, |
79 const aura::Window* ancestor); | 79 const aura::Window* ancestor); |
80 | 80 |
81 } // namespace wm | 81 } // namespace wm |
82 | 82 |
83 #endif // UI_WM_CORE_WINDOW_UTIL_H_ | 83 #endif // UI_WM_CORE_WINDOW_UTIL_H_ |
OLD | NEW |