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

Unified Diff: ui/views/layout/grid_layout.h

Issue 2445513002: Remove stl_util's deletion function use from ui/views/. (Closed)
Patch Set: drop Created 4 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/views/controls/menu/native_menu_win.cc ('k') | ui/views/layout/grid_layout.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.
« no previous file with comments | « ui/views/controls/menu/native_menu_win.cc ('k') | ui/views/layout/grid_layout.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698