summaryrefslogtreecommitdiffstats
path: root/chrome/views/bitmap_scroll_bar.cc
diff options
context:
space:
mode:
authoragl@chromium.org <agl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2008-12-17 02:03:23 +0000
committeragl@chromium.org <agl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2008-12-17 02:03:23 +0000
commit3b680a8b28f63a13f82fbb5e7324fba69c28d75d (patch)
tree5fdcb6ef14cdf63449e95a50c3e18db90d60923a /chrome/views/bitmap_scroll_bar.cc
parent4ec0cd19d253161aa42d0f9583da8f0886dff7c9 (diff)
downloadchromium_src-3b680a8b28f63a13f82fbb5e7324fba69c28d75d.zip
chromium_src-3b680a8b28f63a13f82fbb5e7324fba69c28d75d.tar.gz
chromium_src-3b680a8b28f63a13f82fbb5e7324fba69c28d75d.tar.bz2
Replace some CRects with gfx::Rect
Review URL: http://codereview.chromium.org/14173 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7126 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/views/bitmap_scroll_bar.cc')
-rw-r--r--chrome/views/bitmap_scroll_bar.cc8
1 files changed, 5 insertions, 3 deletions
diff --git a/chrome/views/bitmap_scroll_bar.cc b/chrome/views/bitmap_scroll_bar.cc
index 283f987..54b4f28 100644
--- a/chrome/views/bitmap_scroll_bar.cc
+++ b/chrome/views/bitmap_scroll_bar.cc
@@ -527,12 +527,14 @@ enum ScrollBarContextMenuCommands {
ScrollBarContextMenuCommand_ScrollNext
};
-void BitmapScrollBar::ShowContextMenu(View* source, int x, int y,
+void BitmapScrollBar::ShowContextMenu(View* source,
+ int x,
+ int y,
bool is_mouse_gesture) {
Widget* widget = GetWidget();
- CRect widget_bounds;
+ gfx::Rect widget_bounds;
widget->GetBounds(&widget_bounds, true);
- gfx::Point temp_pt(x - widget_bounds.left, y - widget_bounds.top);
+ gfx::Point temp_pt(x - widget_bounds.x(), y - widget_bounds.y());
View::ConvertPointFromWidget(this, &temp_pt);
context_menu_mouse_position_ = IsHorizontal() ? temp_pt.x() : temp_pt.y();