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

Unified Diff: chrome/browser/views/old_frames/vista_frame.cc

Issue 7317: Change all ConvertPointTo* methods to use gfx::Point instead of CPoint.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 12 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 | « chrome/browser/views/old_frames/simple_xp_frame.cc ('k') | chrome/browser/views/old_frames/xp_frame.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/views/old_frames/vista_frame.cc
===================================================================
--- chrome/browser/views/old_frames/vista_frame.cc (revision 3348)
+++ chrome/browser/views/old_frames/vista_frame.cc (working copy)
@@ -588,18 +588,18 @@
Layout();
}
- CPoint p(0, 0);
+ gfx::Point p;
ChromeViews::View::ConvertPointToViewContainer(tab_contents_container_, &p);
CRect bounds;
GetBounds(&bounds, true);
gfx::Rect r;
- r.set_x(content_rect.x() - p.x);
- r.set_y(content_rect.y() - p.y);
- r.set_width(p.x + content_rect.width() +
- (bounds.Width() - (p.x + tab_contents_container_->width())));
- r.set_height(p.y + content_rect.height() +
- (bounds.Height() - (p.y +
+ r.set_x(content_rect.x() - p.x());
+ r.set_y(content_rect.y() - p.y());
+ r.set_width(p.x() + content_rect.width() +
+ (bounds.Width() - (p.x() + tab_contents_container_->width())));
+ r.set_height(p.y() + content_rect.height() +
+ (bounds.Height() - (p.y() +
tab_contents_container_->height())));
return r;
}
@@ -972,14 +972,14 @@
CRect cr;
GetBounds(&cr, false);
- CPoint tab_pt(pt);
+ gfx::Point tab_pt(pt);
ChromeViews::View::ConvertPointToView(NULL, tabstrip_, &tab_pt);
// If we are over the tabstrip
- if (tab_pt.x > 0 && tab_pt.y >= kTabShadowSize &&
- tab_pt.x < tabstrip_->width() &&
- tab_pt.y < tabstrip_->height()) {
- ChromeViews::View* v = tabstrip_->GetViewForPoint(tab_pt);
+ if (tab_pt.x() > 0 && tab_pt.y() >= kTabShadowSize &&
+ tab_pt.x() < tabstrip_->width() &&
+ tab_pt.y() < tabstrip_->height()) {
+ ChromeViews::View* v = tabstrip_->GetViewForPoint(tab_pt.ToPOINT());
if (v == tabstrip_)
return HTCAPTION;
@@ -1363,10 +1363,10 @@
if (min_x != std::numeric_limits<int>::max() &&
max_x != std::numeric_limits<int>::min() &&
max_y != std::numeric_limits<int>::min()) {
- CPoint screen_drag_point(event.x(), event.y());
+ gfx::Point screen_drag_point(event.x(), event.y());
ConvertPointToScreen(this, &screen_drag_point);
- if (screen_drag_point.x >= min_x && screen_drag_point.x <= max_x &&
- screen_drag_point.y <= max_y) {
+ if (screen_drag_point.x() >= min_x && screen_drag_point.x() <= max_x &&
+ screen_drag_point.y() <= max_y) {
return false;
}
}
« no previous file with comments | « chrome/browser/views/old_frames/simple_xp_frame.cc ('k') | chrome/browser/views/old_frames/xp_frame.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698