Index: ui/views/layout/grid_layout.h |
diff --git a/ui/views/layout/grid_layout.h b/ui/views/layout/grid_layout.h |
index 8ba2aca623fc6fb675fd8abdd97c872e462af3dd..144fac9830232ee2112dc0983216444594bec266 100644 |
--- a/ui/views/layout/grid_layout.h |
+++ b/ui/views/layout/grid_layout.h |
@@ -7,6 +7,7 @@ |
#include <stddef.h> |
+#include <memory> |
#include <vector> |
#include "base/macros.h" |
@@ -197,11 +198,11 @@ class VIEWS_EXPORT GridLayout : public LayoutManager { |
// This is called internally from AddView. It adds the ViewState to the |
// appropriate structures, and updates internal fields such as next_column_. |
- void AddViewState(ViewState* view_state); |
+ void AddViewState(std::unique_ptr<ViewState> view_state); |
// Adds the Row to rows_, as well as updating next_column_, |
// current_row_col_set ... |
- void AddRow(Row* row); |
+ void AddRow(std::unique_ptr<Row> row); |
// As the name says, updates the remaining_height of the ViewState for |
// all Rows the supplied ViewState touches. |
@@ -244,13 +245,13 @@ class VIEWS_EXPORT GridLayout : public LayoutManager { |
bool adding_view_; |
// ViewStates. This is ordered by row_span in ascending order. |
- mutable std::vector<ViewState*> view_states_; |
+ mutable std::vector<std::unique_ptr<ViewState>> view_states_; |
// ColumnSets. |
- mutable std::vector<ColumnSet*> column_sets_; |
+ mutable std::vector<std::unique_ptr<ColumnSet>> column_sets_; |
// Rows. |
- mutable std::vector<Row*> rows_; |
+ mutable std::vector<std::unique_ptr<Row>> rows_; |
// Minimum preferred size. |
gfx::Size minimum_size_; |
@@ -347,14 +348,14 @@ class VIEWS_EXPORT ColumnSet { |
// as updating the remaining_width. |
void CalculateSize(); |
- // Distributes delta amoung the resizable columns. |
+ // Distributes delta among the resizable columns. |
void Resize(int delta); |
// ID for this columnset. |
const int id_; |
// The columns. |
- std::vector<Column*> columns_; |
+ std::vector<std::unique_ptr<Column>> columns_; |
// The ViewStates. This is sorted based on column_span in ascending |
// order. |