summaryrefslogtreecommitdiffstats
path: root/views/controls/table/table_view.cc
diff options
context:
space:
mode:
Diffstat (limited to 'views/controls/table/table_view.cc')
-rw-r--r--views/controls/table/table_view.cc27
1 files changed, 11 insertions, 16 deletions
diff --git a/views/controls/table/table_view.cc b/views/controls/table/table_view.cc
index 0f7d6b9..5ab86d3 100644
--- a/views/controls/table/table_view.cc
+++ b/views/controls/table/table_view.cc
@@ -4,12 +4,8 @@
#include "views/controls/table/table_view.h"
-#include <windowsx.h>
-#include <atlbase.h>
-#include <atlapp.h>
-#include <atlmisc.h>
-
#include <algorithm>
+#include <windowsx.h>
#include "app/gfx/chrome_canvas.h"
#include "app/gfx/favicon_size.h"
@@ -99,7 +95,7 @@ TableView::TableView(TableModel* model,
list_view_(NULL),
header_original_handler_(NULL),
original_handler_(NULL),
- ALLOW_THIS_IN_INITIALIZER_LIST(table_view_wrapper_(this)),
+ table_view_wrapper_(this),
custom_cell_font_(NULL),
content_offset_(0) {
for (std::vector<TableColumn>::const_iterator i = columns.begin();
@@ -578,10 +574,10 @@ LRESULT CALLBACK TableView::TableWndProc(HWND window,
// the position supplied in the l_param.
if (table_view->UILayoutIsRightToLeft() &&
(GET_X_LPARAM(l_param) != -1 || GET_Y_LPARAM(l_param) != -1)) {
- WTL::CPoint screen_point;
+ CPoint screen_point;
GetCursorPos(&screen_point);
- WTL::CPoint table_point = screen_point;
- WTL::CRect client_rect;
+ CPoint table_point = screen_point;
+ CRect client_rect;
if (ScreenToClient(window, &table_point) &&
GetClientRect(window, &client_rect) &&
client_rect.PtInRect(table_point)) {
@@ -1235,11 +1231,11 @@ LRESULT TableView::OnCustomDraw(NMLVCUSTOMDRAW* draw_info) {
SkBitmap image = model_->GetIcon(model_index);
if (!image.isNull()) {
// Get the rect that holds the icon.
- WTL::CRect icon_rect, client_rect;
+ CRect icon_rect, client_rect;
if (ListView_GetItemRect(list_view_, view_index, &icon_rect,
LVIR_ICON) &&
GetClientRect(list_view_, &client_rect)) {
- WTL::CRect intersection;
+ CRect intersection;
// Client rect includes the header but we need to make sure we don't
// paint into it.
client_rect.top += content_offset_;
@@ -1291,11 +1287,10 @@ LRESULT TableView::OnCustomDraw(NMLVCUSTOMDRAW* draw_info) {
}
}
if (ImplementPostPaint()) {
- WTL::CRect cell_rect;
+ CRect cell_rect;
if (ListView_GetItemRect(list_view_, view_index, &cell_rect,
LVIR_BOUNDS)) {
- PostPaint(model_index, 0, false, gfx::Rect(cell_rect),
- draw_info->nmcd.hdc);
+ PostPaint(model_index, 0, false, cell_rect, draw_info->nmcd.hdc);
r = CDRF_SKIPDEFAULT;
}
}
@@ -1318,7 +1313,7 @@ void TableView::ResetColumnSizes() {
// See comment in TableColumn for what this does.
int width = this->width();
- WTL::CRect native_bounds;
+ CRect native_bounds;
if (GetClientRect(GetNativeControlHWND(), &native_bounds) &&
native_bounds.Width() > 0) {
// Prefer the bounds of the window over our bounds, which may be different.
@@ -1529,7 +1524,7 @@ void TableView::UpdateContentOffset() {
POINT origin = {0, 0};
MapWindowPoints(header, list_view_, &origin, 1);
- WTL::CRect header_bounds;
+ CRect header_bounds;
GetWindowRect(header, &header_bounds);
content_offset_ = origin.y + header_bounds.Height();