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

Unified Diff: chrome/views/root_view.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/root_view.h ('k') | chrome/views/root_view_drop_target.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/views/root_view.cc
===================================================================
--- chrome/views/root_view.cc (revision 3347)
+++ chrome/views/root_view.cc (working copy)
@@ -323,7 +323,8 @@
return hit_disabled_view;
}
-bool RootView::ConvertPointToMouseHandler(const CPoint &l, CPoint *p) {
+bool RootView::ConvertPointToMouseHandler(const gfx::Point& l,
+ gfx::Point* p) {
//
// If the mouse_handler was set explicitly, we need to keep
// sending events even if it was reparented in a different
@@ -354,9 +355,9 @@
if (mouse_pressed_handler_) {
SetMouseLocationAndFlags(e);
- CPoint p;
- ConvertPointToMouseHandler(WTL::CPoint(e.x(), e.y()), &p);
- MouseEvent mouse_event(e.GetType(), p.x, p.y, e.GetFlags());
+ gfx::Point p;
+ ConvertPointToMouseHandler(e.location(), &p);
+ MouseEvent mouse_event(e.GetType(), p.x(), p.y(), e.GetFlags());
if (!mouse_pressed_handler_->ProcessMouseDragged(mouse_event,
&drag_info)) {
mouse_pressed_handler_ = NULL;
@@ -372,9 +373,9 @@
UpdateCursor(e);
if (mouse_pressed_handler_) {
- CPoint p;
- ConvertPointToMouseHandler(WTL::CPoint(e.x(), e.y()), &p);
- MouseEvent mouse_released(e.GetType(), p.x, p.y, e.GetFlags());
+ gfx::Point p;
+ ConvertPointToMouseHandler(e.location(), &p);
+ MouseEvent mouse_released(e.GetType(), p.x(), p.y(), e.GetFlags());
// We allow the view to delete us from ProcessMouseReleased. As such,
// configure state such that we're done first, then call View.
View* mouse_pressed_handler = mouse_pressed_handler_;
@@ -386,12 +387,12 @@
}
void RootView::UpdateCursor(const MouseEvent& e) {
- View *v = GetViewForPoint(WTL::CPoint(e.x(), e.y()));
+ View *v = GetViewForPoint(e.location().ToPOINT());
if (v && v != this) {
- CPoint l(e.x(), e.y());
+ gfx::Point l(e.location());
View::ConvertPointToView(this, v, &l);
- HCURSOR cursor = v->GetCursorForPoint(e.GetType(), l.x, l.y);
+ HCURSOR cursor = v->GetCursorForPoint(e.GetType(), l.x(), l.y());
if (cursor) {
::SetCursor(cursor);
return;
« no previous file with comments | « chrome/views/root_view.h ('k') | chrome/views/root_view_drop_target.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698