OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_AURA_WINDOW_H_ | 5 #ifndef UI_AURA_WINDOW_H_ |
6 #define UI_AURA_WINDOW_H_ | 6 #define UI_AURA_WINDOW_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <map> | 9 #include <map> |
10 #include <vector> | 10 #include <vector> |
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
175 // children get the following behavior: | 175 // children get the following behavior: |
176 // . The transient parent destroys any transient children when it is | 176 // . The transient parent destroys any transient children when it is |
177 // destroyed. This means a transient child is destroyed if either its parent | 177 // destroyed. This means a transient child is destroyed if either its parent |
178 // or transient parent is destroyed. | 178 // or transient parent is destroyed. |
179 // . If a transient child and its transient parent share the same parent, then | 179 // . If a transient child and its transient parent share the same parent, then |
180 // transient children are always ordered above the trasient parent. | 180 // transient children are always ordered above the trasient parent. |
181 // Transient windows are typically used for popups and menus. | 181 // Transient windows are typically used for popups and menus. |
182 void AddTransientChild(Window* child); | 182 void AddTransientChild(Window* child); |
183 void RemoveTransientChild(Window* child); | 183 void RemoveTransientChild(Window* child); |
184 | 184 |
| 185 const Windows& transient_children() const { return transient_children_; } |
| 186 |
| 187 Window* transient_parent() { return transient_parent_; } |
| 188 const Window* transient_parent() const { return transient_parent_; } |
| 189 |
185 // Retrieves the first-level child with the specified id, or NULL if no first- | 190 // Retrieves the first-level child with the specified id, or NULL if no first- |
186 // level child is found matching |id|. | 191 // level child is found matching |id|. |
187 Window* GetChildById(int id); | 192 Window* GetChildById(int id); |
188 const Window* GetChildById(int id) const; | 193 const Window* GetChildById(int id) const; |
189 | 194 |
190 static void ConvertPointToWindow(const Window* source, | 195 static void ConvertPointToWindow(const Window* source, |
191 const Window* target, | 196 const Window* target, |
192 gfx::Point* point); | 197 gfx::Point* point); |
193 | 198 |
194 // Returns the cursor for the specified point, in window coordinates. | 199 // Returns the cursor for the specified point, in window coordinates. |
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
355 // TODO(oshima): Consolidcate ViewProp and aura::window property | 360 // TODO(oshima): Consolidcate ViewProp and aura::window property |
356 // implementation. | 361 // implementation. |
357 std::map<const char*, ui::ViewProp*> prop_map_; | 362 std::map<const char*, ui::ViewProp*> prop_map_; |
358 | 363 |
359 DISALLOW_COPY_AND_ASSIGN(Window); | 364 DISALLOW_COPY_AND_ASSIGN(Window); |
360 }; | 365 }; |
361 | 366 |
362 } // namespace aura | 367 } // namespace aura |
363 | 368 |
364 #endif // UI_AURA_WINDOW_H_ | 369 #endif // UI_AURA_WINDOW_H_ |
OLD | NEW |