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

Unified Diff: chrome/browser/views/download_tab_view.cc

Issue 13606: Some Cleanup converting CRect to gfx::Rect (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 12 years 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/views/download_tab_view.cc
===================================================================
--- chrome/browser/views/download_tab_view.cc (revision 6273)
+++ chrome/browser/views/download_tab_view.cc (working copy)
@@ -731,13 +731,13 @@
model_->safety_state() == DownloadItem::DANGEROUS)
return false;
- CPoint point(event.x(), event.y());
+ gfx::Point point(event.x(), event.y());
// In order to make sure drag and drop works as expected when the UI is
// mirrored, we can either flip the mouse X coordinate or flip the X position
// of the drag rectangle. Flipping the mouse X coordinate is easier.
- point.x = MirroredXCoordinateInsideView(point.x);
- CRect drag_rect(kDownloadIconOffset -
+ point.set_x(MirroredXCoordinateInsideView(point.x()));
+ gfx::Rect drag_rect(kDownloadIconOffset -
parent_->big_icon_offset(),
0,
kDownloadIconOffset -
@@ -746,7 +746,7 @@
kFilenameSize,
parent_->big_icon_size());
- if (drag_rect.PtInRect(point)) {
+ if (drag_rect.Contains(point)) {
SkBitmap* icon = parent_->LookupIcon(model_);
if (icon)
download_util::DragDownload(model_, icon);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698