summaryrefslogtreecommitdiffstats
path: root/chrome/browser/views/tabs/dragged_tab_controller.cc
diff options
context:
space:
mode:
authorben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2008-10-14 20:58:44 +0000
committerben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2008-10-14 20:58:44 +0000
commit96b667d273c25e55150785848942c51f1a98851b (patch)
tree21ad2f8bc3a2148a517998f4ebb0157b22a75082 /chrome/browser/views/tabs/dragged_tab_controller.cc
parentdf40752a0913948b49086fee421b0d019f7de8da (diff)
downloadchromium_src-96b667d273c25e55150785848942c51f1a98851b.zip
chromium_src-96b667d273c25e55150785848942c51f1a98851b.tar.gz
chromium_src-96b667d273c25e55150785848942c51f1a98851b.tar.bz2
Change all ConvertPointTo* methods to use gfx::Point instead of CPoint.
http://crbug.com/2186 Review URL: http://codereview.chromium.org/7317 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@3365 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/views/tabs/dragged_tab_controller.cc')
-rw-r--r--chrome/browser/views/tabs/dragged_tab_controller.cc15
1 files changed, 7 insertions, 8 deletions
diff --git a/chrome/browser/views/tabs/dragged_tab_controller.cc b/chrome/browser/views/tabs/dragged_tab_controller.cc
index ef649e8..bb93238 100644
--- a/chrome/browser/views/tabs/dragged_tab_controller.cc
+++ b/chrome/browser/views/tabs/dragged_tab_controller.cc
@@ -71,10 +71,10 @@ class WindowFinder {
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 @@ void DraggedTabController::DidProcessMessage(const MSG& msg) {
// 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::Point DraggedTabController::GetCursorScreenPoint() const {
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);
}