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

Unified Diff: chrome/browser/views/tabs/dragged_tab_controller.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/status_bubble.cc ('k') | chrome/browser/views/tabs/tab_strip.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/views/tabs/dragged_tab_controller.cc
===================================================================
--- chrome/browser/views/tabs/dragged_tab_controller.cc (revision 3347)
+++ chrome/browser/views/tabs/dragged_tab_controller.cc (working copy)
@@ -71,10 +71,10 @@
gfx::Point ConvertScreenPointToTabStripPoint(TabStrip* tabstrip,
const gfx::Point& screen_point) {
- CPoint tabstrip_topleft(0, 0);
+ gfx::Point tabstrip_topleft;
ChromeViews::View::ConvertPointToScreen(tabstrip, &tabstrip_topleft);
- return gfx::Point(screen_point.x() - tabstrip_topleft.x,
- screen_point.y() - tabstrip_topleft.y);
+ return gfx::Point(screen_point.x() - tabstrip_topleft.x(),
+ screen_point.y() - tabstrip_topleft.y());
}
}
@@ -271,11 +271,10 @@
// DraggedTabController, private:
void DraggedTabController::InitWindowCreatePoint() {
- CPoint mouse_offset_cpoint(mouse_offset_.x(), mouse_offset_.y());
+ window_create_point_.SetPoint(mouse_offset_.x(), mouse_offset_.y());
Tab* first_tab = attached_tabstrip_->GetTabAt(0);
ChromeViews::View::ConvertPointToViewContainer(first_tab,
- &mouse_offset_cpoint);
- window_create_point_.SetPoint(mouse_offset_cpoint.x, mouse_offset_cpoint.y);
+ &window_create_point_);
}
gfx::Point DraggedTabController::GetWindowCreatePoint() const {
@@ -727,11 +726,11 @@
gfx::Rect DraggedTabController::GetViewScreenBounds(
ChromeViews::View* view) const {
- CPoint view_topleft(0, 0);
+ gfx::Point view_topleft;
ChromeViews::View::ConvertPointToScreen(view, &view_topleft);
CRect view_screen_bounds;
view->GetLocalBounds(&view_screen_bounds, true);
- view_screen_bounds.OffsetRect(view_topleft);
+ view_screen_bounds.OffsetRect(view_topleft.ToPOINT());
return gfx::Rect(view_screen_bounds);
}
« no previous file with comments | « chrome/browser/views/status_bubble.cc ('k') | chrome/browser/views/tabs/tab_strip.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698