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

Unified Diff: ui/views/controls/table/table_view.cc

Issue 2702673002: Remove unused TableViewRowBackgroundPainter class. (Closed)
Patch Set: remove include Created 3 years, 10 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/table/table_view.h ('k') | ui/views/controls/table/table_view_row_background_painter.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/controls/table/table_view.cc
diff --git a/ui/views/controls/table/table_view.cc b/ui/views/controls/table/table_view.cc
index db200b55c442a957fd2edbfbd26fe011773e754f..94fe60c9bd560dccfb18cd4f10ac0cdd5a874369 100644
--- a/ui/views/controls/table/table_view.cc
+++ b/ui/views/controls/table/table_view.cc
@@ -28,7 +28,6 @@
#include "ui/views/controls/table/table_header.h"
#include "ui/views/controls/table/table_utils.h"
#include "ui/views/controls/table/table_view_observer.h"
-#include "ui/views/controls/table/table_view_row_background_painter.h"
// Padding around the text (on each side).
static const int kTextVerticalPadding = 3;
@@ -180,11 +179,6 @@ View* TableView::CreateParentIfNecessary() {
return scroll_view;
}
-void TableView::SetRowBackgroundPainter(
- std::unique_ptr<TableViewRowBackgroundPainter> painter) {
- row_background_painter_ = std::move(painter);
-}
-
void TableView::SetGrouper(TableGrouper* grouper) {
grouper_ = grouper;
SortItemsAndUpdateMapping();
@@ -550,13 +544,8 @@ void TableView::OnPaint(gfx::Canvas* canvas) {
for (int i = region.min_row; i < region.max_row; ++i) {
const int model_index = ViewToModel(i);
const bool is_selected = selection_model_.IsSelected(model_index);
- if (is_selected) {
+ if (is_selected)
canvas->FillRect(GetRowBounds(i), selected_bg_color);
- } else if (row_background_painter_) {
- row_background_painter_->PaintRowBackground(model_index,
- GetRowBounds(i),
- canvas);
- }
if (selection_model_.active() == model_index && HasFocus())
canvas->DrawFocusRect(GetRowBounds(i));
for (int j = region.min_column; j < region.max_column; ++j) {
« no previous file with comments | « ui/views/controls/table/table_view.h ('k') | ui/views/controls/table/table_view_row_background_painter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698