Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(12)

Side by Side Diff: ui/aura/window.h

Issue 8700013: Release aura::Desktop event handler windows on detaching an ancestor window. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Use parent_ to access parent. Created 9 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ui/aura/desktop.cc ('k') | ui/aura/window.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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_
OLDNEW
« no previous file with comments | « ui/aura/desktop.cc ('k') | ui/aura/window.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698