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

Unified Diff: chrome/browser/views/tabs/tab_strip.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/tabs/tab_strip.h ('k') | chrome/browser/views/toolbar_star_toggle.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/views/tabs/tab_strip.cc
===================================================================
--- chrome/browser/views/tabs/tab_strip.cc (revision 3348)
+++ chrome/browser/views/tabs/tab_strip.cc (working copy)
@@ -527,8 +527,8 @@
return IsAnimating() == NULL;
}
-bool TabStrip::PointIsWithinWindowCaption(const CPoint& point) {
- ChromeViews::View* v = GetViewForPoint(point);
+bool TabStrip::PointIsWithinWindowCaption(const gfx::Point& point) {
+ ChromeViews::View* v = GetViewForPoint(point.ToPOINT());
// If there is no control at this location, claim the hit was in the title
// bar to get a move action.
@@ -543,10 +543,10 @@
// Check to see if the point is within the non-button parts of the new tab
// button. The button has a non-rectangular shape, so if it's not in the
// visual portions of the button we treat it as a click to the caption.
- CPoint point_in_newtab_coords(point);
+ gfx::Point point_in_newtab_coords(point);
View::ConvertPointToView(this, newtab_button_, &point_in_newtab_coords);
- if (newtab_button_->bounds().Contains(gfx::Point(point)) &&
- !newtab_button_->HitTest(point_in_newtab_coords)) {
+ if (newtab_button_->bounds().Contains(point) &&
+ !newtab_button_->HitTest(point_in_newtab_coords.ToPOINT())) {
return true;
}
@@ -1241,9 +1241,9 @@
bool TabStrip::IsCursorInTabStripZone() {
CRect bounds;
GetLocalBounds(&bounds, true);
- CPoint tabstrip_topleft = bounds.TopLeft();
+ gfx::Point tabstrip_topleft(bounds.TopLeft());
View::ConvertPointToScreen(this, &tabstrip_topleft);
- bounds.MoveToXY(tabstrip_topleft);
+ bounds.MoveToXY(tabstrip_topleft.ToPOINT());
bounds.bottom += kTabStripAnimationVSlop;
CPoint cursor_point;
@@ -1309,9 +1309,10 @@
center_x = MirroredXCoordinateInsideView(center_x);
// Determine the screen bounds.
- CPoint drop_loc(center_x - drop_indicator_width / 2, -drop_indicator_height);
+ gfx::Point drop_loc(center_x - drop_indicator_width / 2,
+ -drop_indicator_height);
ConvertPointToScreen(this, &drop_loc);
- gfx::Rect drop_bounds(drop_loc.x, drop_loc.y, drop_indicator_width,
+ gfx::Rect drop_bounds(drop_loc.x(), drop_loc.y(), drop_indicator_width,
drop_indicator_height);
// If the rect doesn't fit on the monitor, push the arrow to the bottom.
@@ -1566,8 +1567,8 @@
}
bool TabStrip::IsPointInTab(Tab* tab, const CPoint& point_in_tabstrip_coords) {
- CPoint point_in_tab_coords(point_in_tabstrip_coords);
+ gfx::Point point_in_tab_coords(point_in_tabstrip_coords);
View::ConvertPointToView(this, tab, &point_in_tab_coords);
- return tab->HitTest(point_in_tab_coords);
+ return tab->HitTest(point_in_tab_coords.ToPOINT());
}
« no previous file with comments | « chrome/browser/views/tabs/tab_strip.h ('k') | chrome/browser/views/toolbar_star_toggle.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698