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

Unified Diff: views/controls/table/group_table_view.cc

Issue 115309: Remove even more ATL dependencies. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years, 7 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 | « views/controls/table/group_table_view.h ('k') | views/controls/table/table_view.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: views/controls/table/group_table_view.cc
===================================================================
--- views/controls/table/group_table_view.cc (revision 16052)
+++ views/controls/table/group_table_view.cc (working copy)
@@ -5,6 +5,7 @@
#include "views/controls/table/group_table_view.h"
#include "app/gfx/chrome_canvas.h"
+#include "base/compiler_specific.h"
#include "base/message_loop.h"
#include "base/task.h"
@@ -24,7 +25,7 @@
: TableView(model, columns, table_type, false, resizable_columns,
autosize_columns),
model_(model),
- sync_selection_factory_(this) {
+ ALLOW_THIS_IN_INITIALIZER_LIST(sync_selection_factory_(this)) {
}
GroupTableView::~GroupTableView() {
@@ -165,22 +166,22 @@
// Draws the line separator betweens the groups.
void GroupTableView::PostPaint(int model_row, int column, bool selected,
- const CRect& bounds, HDC hdc) {
+ const gfx::Rect& bounds, HDC hdc) {
GroupRange group_range;
model_->GetGroupRangeForItem(model_row, &group_range);
// We always paint a vertical line at the end of the last cell.
HPEN hPen = CreatePen(PS_SOLID, kSeparatorLineThickness, kSeparatorLineColor);
HPEN hPenOld = (HPEN) SelectObject(hdc, hPen);
- int x = static_cast<int>(bounds.right - kSeparatorLineThickness);
- MoveToEx(hdc, x, bounds.top, NULL);
- LineTo(hdc, x, bounds.bottom);
+ int x = static_cast<int>(bounds.right() - kSeparatorLineThickness);
+ MoveToEx(hdc, x, bounds.y(), NULL);
+ LineTo(hdc, x, bounds.bottom());
// We paint a separator line after the last item of a group.
if (model_row == (group_range.start + group_range.length - 1)) {
- int y = static_cast<int>(bounds.bottom - kSeparatorLineThickness);
+ int y = static_cast<int>(bounds.bottom() - kSeparatorLineThickness);
MoveToEx(hdc, 0, y, NULL);
- LineTo(hdc, bounds.Width(), y);
+ LineTo(hdc, bounds.width(), y);
}
SelectObject(hdc, hPenOld);
DeleteObject(hPen);
« no previous file with comments | « views/controls/table/group_table_view.h ('k') | views/controls/table/table_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698