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

Side by Side Diff: ash/wm/window_util.cc

Issue 115453004: Moves management of transients out of Window (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: remove unneeded parens Created 6 years, 11 months 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 | « ash/wm/window_state.cc ('k') | ash/wm/workspace/workspace_layout_manager_unittest.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) 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 #include "ash/wm/window_util.h" 5 #include "ash/wm/window_util.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "ash/ash_constants.h" 9 #include "ash/ash_constants.h"
10 #include "ash/screen_ash.h" 10 #include "ash/screen_ash.h"
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 aura::Window* old_parent, 127 aura::Window* old_parent,
128 aura::Window* new_parent) { 128 aura::Window* new_parent) {
129 if (child->parent() == old_parent) 129 if (child->parent() == old_parent)
130 new_parent->AddChild(child); 130 new_parent->AddChild(child);
131 ReparentTransientChildrenOfChild(child, old_parent, new_parent); 131 ReparentTransientChildrenOfChild(child, old_parent, new_parent);
132 } 132 }
133 133
134 void ReparentTransientChildrenOfChild(aura::Window* child, 134 void ReparentTransientChildrenOfChild(aura::Window* child,
135 aura::Window* old_parent, 135 aura::Window* old_parent,
136 aura::Window* new_parent) { 136 aura::Window* new_parent) {
137 for (size_t i = 0; i < child->transient_children().size(); ++i) { 137 for (size_t i = 0;
138 ReparentChildWithTransientChildren(child->transient_children()[i], 138 i < views::corewm::GetTransientChildren(child).size();
139 old_parent, 139 ++i) {
140 new_parent); 140 ReparentChildWithTransientChildren(
141 views::corewm::GetTransientChildren(child)[i],
142 old_parent,
143 new_parent);
141 } 144 }
142 } 145 }
143 146
144 } // namespace wm 147 } // namespace wm
145 } // namespace ash 148 } // namespace ash
OLDNEW
« no previous file with comments | « ash/wm/window_state.cc ('k') | ash/wm/workspace/workspace_layout_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698