| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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/browser/ui/cocoa/autofill/simple_grid_layout.h" | 5 #include "chrome/browser/ui/cocoa/autofill/simple_grid_layout.h" |
| 6 | 6 |
| 7 #include <stddef.h> |
| 8 |
| 7 #include <algorithm> | 9 #include <algorithm> |
| 8 | 10 |
| 9 #include "base/logging.h" | 11 #include "base/logging.h" |
| 10 #include "base/stl_util.h" | 12 #include "base/stl_util.h" |
| 11 | 13 |
| 12 namespace { | 14 namespace { |
| 13 const int kAutoColumnIdStart = 1000000; // Starting ID for autogeneration. | 15 const int kAutoColumnIdStart = 1000000; // Starting ID for autogeneration. |
| 14 } | 16 } |
| 15 | 17 |
| 16 // Encapsulates state for a single NSView in the layout | 18 // Encapsulates state for a single NSView in the layout |
| (...skipping 355 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 372 | 374 |
| 373 SizeRowsAndColumns(width); | 375 SizeRowsAndColumns(width); |
| 374 return rows_.back()->Location() + rows_.back()->Size(); | 376 return rows_.back()->Location() + rows_.back()->Size(); |
| 375 } | 377 } |
| 376 | 378 |
| 377 void SimpleGridLayout::AddRow(Row* row) { | 379 void SimpleGridLayout::AddRow(Row* row) { |
| 378 next_column_ = 0; | 380 next_column_ = 0; |
| 379 rows_.push_back(row); | 381 rows_.push_back(row); |
| 380 } | 382 } |
| 381 | 383 |
| OLD | NEW |