| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 "chrome/views/view.h" | 5 #include "chrome/views/view.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #ifndef NDEBUG | 9 #ifndef NDEBUG |
| 10 #include <iostream> | 10 #include <iostream> |
| (...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 199 // | 199 // |
| 200 // View - layout | 200 // View - layout |
| 201 // | 201 // |
| 202 ///////////////////////////////////////////////////////////////////////////// | 202 ///////////////////////////////////////////////////////////////////////////// |
| 203 | 203 |
| 204 void View::Layout() { | 204 void View::Layout() { |
| 205 // Layout child Views | 205 // Layout child Views |
| 206 if (layout_manager_.get()) { | 206 if (layout_manager_.get()) { |
| 207 layout_manager_->Layout(this); | 207 layout_manager_->Layout(this); |
| 208 SchedulePaint(); | 208 SchedulePaint(); |
| 209 return; | |
| 210 } | 209 } |
| 211 | 210 |
| 212 // Lay out contents of child Views | 211 // Lay out contents of child Views |
| 213 int child_count = GetChildViewCount(); | 212 int child_count = GetChildViewCount(); |
| 214 for (int i = 0; i < child_count; ++i) { | 213 for (int i = 0; i < child_count; ++i) { |
| 215 View* child = GetChildViewAt(i); | 214 View* child = GetChildViewAt(i); |
| 216 child->Layout(); | 215 child->Layout(); |
| 217 } | 216 } |
| 218 } | 217 } |
| 219 | 218 |
| (...skipping 1371 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1591 } | 1590 } |
| 1592 | 1591 |
| 1593 void View::DragInfo::PossibleDrag(int x, int y) { | 1592 void View::DragInfo::PossibleDrag(int x, int y) { |
| 1594 possible_drag = true; | 1593 possible_drag = true; |
| 1595 start_x = x; | 1594 start_x = x; |
| 1596 start_y = y; | 1595 start_y = y; |
| 1597 } | 1596 } |
| 1598 | 1597 |
| 1599 } // namespace | 1598 } // namespace |
| 1600 | 1599 |
| OLD | NEW |