OLD | NEW |
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 "ui/views/controls/table/table_view.h" | 5 #include "ui/views/controls/table/table_view.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <map> | 9 #include <map> |
10 #include <utility> | 10 #include <utility> |
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
171 View* TableView::CreateParentIfNecessary() { | 171 View* TableView::CreateParentIfNecessary() { |
172 ScrollView* scroll_view = ScrollView::CreateScrollViewWithBorder(); | 172 ScrollView* scroll_view = ScrollView::CreateScrollViewWithBorder(); |
173 scroll_view->SetContents(this); | 173 scroll_view->SetContents(this); |
174 CreateHeaderIfNecessary(); | 174 CreateHeaderIfNecessary(); |
175 if (header_) | 175 if (header_) |
176 scroll_view->SetHeader(header_); | 176 scroll_view->SetHeader(header_); |
177 return scroll_view; | 177 return scroll_view; |
178 } | 178 } |
179 | 179 |
180 void TableView::SetRowBackgroundPainter( | 180 void TableView::SetRowBackgroundPainter( |
181 scoped_ptr<TableViewRowBackgroundPainter> painter) { | 181 std::unique_ptr<TableViewRowBackgroundPainter> painter) { |
182 row_background_painter_ = std::move(painter); | 182 row_background_painter_ = std::move(painter); |
183 } | 183 } |
184 | 184 |
185 void TableView::SetGrouper(TableGrouper* grouper) { | 185 void TableView::SetGrouper(TableGrouper* grouper) { |
186 grouper_ = grouper; | 186 grouper_ = grouper; |
187 SortItemsAndUpdateMapping(); | 187 SortItemsAndUpdateMapping(); |
188 } | 188 } |
189 | 189 |
190 int TableView::RowCount() const { | 190 int TableView::RowCount() const { |
191 return model_ ? model_->RowCount() : 0; | 191 return model_ ? model_->RowCount() : 0; |
(...skipping 756 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
948 if (tooltip) | 948 if (tooltip) |
949 *tooltip = text; | 949 *tooltip = text; |
950 if (tooltip_origin) { | 950 if (tooltip_origin) { |
951 tooltip_origin->SetPoint(cell_bounds.x(), | 951 tooltip_origin->SetPoint(cell_bounds.x(), |
952 cell_bounds.y() + kTextVerticalPadding); | 952 cell_bounds.y() + kTextVerticalPadding); |
953 } | 953 } |
954 return true; | 954 return true; |
955 } | 955 } |
956 | 956 |
957 } // namespace views | 957 } // namespace views |
OLD | NEW |