| 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 <string> | 10 #include <string> |
| (...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 139 bool CanActivate() const; | 139 bool CanActivate() const; |
| 140 | 140 |
| 141 // Tree operations. | 141 // Tree operations. |
| 142 // TODO(beng): Child windows are currently not owned by the hierarchy. We | 142 // TODO(beng): Child windows are currently not owned by the hierarchy. We |
| 143 // should change this. | 143 // should change this. |
| 144 void AddChild(Window* child); | 144 void AddChild(Window* child); |
| 145 void RemoveChild(Window* child); | 145 void RemoveChild(Window* child); |
| 146 | 146 |
| 147 const Windows& children() const { return children_; } | 147 const Windows& children() const { return children_; } |
| 148 | 148 |
| 149 // Returns true if this Window contains |other| somewhere in its children. |
| 150 bool Contains(const Window* other) const; |
| 151 |
| 149 // Adds or removes |child| as a transient child of this window. Transient | 152 // Adds or removes |child| as a transient child of this window. Transient |
| 150 // children get the following behavior: | 153 // children get the following behavior: |
| 151 // . The transient parent destroys any transient children when it is | 154 // . The transient parent destroys any transient children when it is |
| 152 // destroyed. This means a transient child is destroyed if either its parent | 155 // destroyed. This means a transient child is destroyed if either its parent |
| 153 // or transient parent is destroyed. | 156 // or transient parent is destroyed. |
| 154 // . If a transient child and its transient parent share the same parent, then | 157 // . If a transient child and its transient parent share the same parent, then |
| 155 // transient children are always ordered above the trasient parent. | 158 // transient children are always ordered above the trasient parent. |
| 156 // Transient windows are typically used for popups and menus. | 159 // Transient windows are typically used for popups and menus. |
| 157 void AddTransientChild(Window* child); | 160 void AddTransientChild(Window* child); |
| 158 void RemoveTransientChild(Window* child); | 161 void RemoveTransientChild(Window* child); |
| (...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 339 // TODO(oshima): Consolidcate ViewProp and aura::window property | 342 // TODO(oshima): Consolidcate ViewProp and aura::window property |
| 340 // implementation. | 343 // implementation. |
| 341 std::map<const char*, void*> prop_map_; | 344 std::map<const char*, void*> prop_map_; |
| 342 | 345 |
| 343 DISALLOW_COPY_AND_ASSIGN(Window); | 346 DISALLOW_COPY_AND_ASSIGN(Window); |
| 344 }; | 347 }; |
| 345 | 348 |
| 346 } // namespace aura | 349 } // namespace aura |
| 347 | 350 |
| 348 #endif // UI_AURA_WINDOW_H_ | 351 #endif // UI_AURA_WINDOW_H_ |
| OLD | NEW |