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

Unified Diff: chrome/views/menu_button.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/views/hwnd_view_container.cc ('k') | chrome/views/root_view.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/views/menu_button.cc
===================================================================
--- chrome/views/menu_button.cc (revision 3347)
+++ chrome/views/menu_button.cc (working copy)
@@ -129,9 +129,9 @@
// 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 @@
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 @@
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();
« no previous file with comments | « chrome/views/hwnd_view_container.cc ('k') | chrome/views/root_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698