OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 COMPONENTS_MUS_COMMON_TRANSIENT_WINDOW_UTILS_H_ | 5 #ifndef COMPONENTS_MUS_COMMON_TRANSIENT_WINDOW_UTILS_H_ |
6 #define COMPONENTS_MUS_COMMON_TRANSIENT_WINDOW_UTILS_H_ | 6 #define COMPONENTS_MUS_COMMON_TRANSIENT_WINDOW_UTILS_H_ |
7 | 7 |
| 8 #include <stddef.h> |
| 9 |
8 #include <vector> | 10 #include <vector> |
9 | 11 |
10 #include "components/mus/public/interfaces/mus_constants.mojom.h" | 12 #include "components/mus/public/interfaces/mus_constants.mojom.h" |
11 | 13 |
12 namespace mus { | 14 namespace mus { |
13 | 15 |
14 // Returns true if |window| has |ancestor| as a transient ancestor. A transient | 16 // Returns true if |window| has |ancestor| as a transient ancestor. A transient |
15 // ancestor is found by following the transient parent chain of the window. | 17 // ancestor is found by following the transient parent chain of the window. |
16 template <class T> | 18 template <class T> |
17 bool HasTransientAncestor(const T* window, const T* ancestor) { | 19 bool HasTransientAncestor(const T* window, const T* ancestor) { |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
115 T* old_stacking_target = *GetStackingTarget(*it); | 117 T* old_stacking_target = *GetStackingTarget(*it); |
116 *GetStackingTarget(*it) = window; | 118 *GetStackingTarget(*it) = window; |
117 Reorder(*it, window, mojom::ORDER_DIRECTION_ABOVE); | 119 Reorder(*it, window, mojom::ORDER_DIRECTION_ABOVE); |
118 *GetStackingTarget(*it) = old_stacking_target; | 120 *GetStackingTarget(*it) = old_stacking_target; |
119 } | 121 } |
120 } | 122 } |
121 } | 123 } |
122 } // namespace mus | 124 } // namespace mus |
123 | 125 |
124 #endif // COMPONENTS_MUS_COMMON_TRANSIENT_WINDOW_UTILS_H_ | 126 #endif // COMPONENTS_MUS_COMMON_TRANSIENT_WINDOW_UTILS_H_ |
OLD | NEW |