diff options
author | ben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-10-14 20:58:44 +0000 |
---|---|---|
committer | ben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-10-14 20:58:44 +0000 |
commit | 96b667d273c25e55150785848942c51f1a98851b (patch) | |
tree | 21ad2f8bc3a2148a517998f4ebb0157b22a75082 /chrome/views/menu_button.cc | |
parent | df40752a0913948b49086fee421b0d019f7de8da (diff) | |
download | chromium_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/views/menu_button.cc')
-rw-r--r-- | chrome/views/menu_button.cc | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/chrome/views/menu_button.cc b/chrome/views/menu_button.cc index b2bdbea..f8b0980 100644 --- a/chrome/views/menu_button.cc +++ b/chrome/views/menu_button.cc @@ -129,9 +129,9 @@ bool MenuButton::Activate() { // The position of the menu depends on whether or not the locale is // right-to-left. - CPoint menu_position = lb.BottomRight(); + gfx::Point menu_position(lb.BottomRight()); if (UILayoutIsRightToLeft()) - menu_position.x = lb.left; + menu_position.set_x(lb.left); View::ConvertPointToScreen(this, &menu_position); if (UILayoutIsRightToLeft()) @@ -140,8 +140,8 @@ bool MenuButton::Activate() { menu_position.Offset(-2, -4); int max_x_coordinate = GetMaximumScreenXCoordinate(); - if (max_x_coordinate && max_x_coordinate <= menu_position.x) - menu_position.x = max_x_coordinate - 1; + if (max_x_coordinate && max_x_coordinate <= menu_position.x()) + menu_position.set_x(max_x_coordinate - 1); // We're about to show the menu from a mouse press. By showing from the // mouse press event we block RootView in mouse dispatching. This also @@ -153,7 +153,8 @@ bool MenuButton::Activate() { GetRootView()->SetMouseHandler(NULL); menu_visible_ = true; - menu_delegate_->RunMenu(this, menu_position, GetViewContainer()->GetHWND()); + menu_delegate_->RunMenu(this, menu_position.ToPOINT(), + GetViewContainer()->GetHWND()); menu_visible_ = false; menu_closed_time_ = Time::Now(); |