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

Unified Diff: chrome/browser/views/download_tab_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/browser/views/download_item_view.cc ('k') | chrome/browser/views/frame/browser_view2.cc » ('j') | 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 3347)
+++ chrome/browser/views/download_tab_view.cc (working copy)
@@ -697,24 +697,23 @@
}
bool DownloadItemTabView::OnMousePressed(const ChromeViews::MouseEvent& event) {
- CPoint point(event.x(), event.y());
+ gfx::Point point(event.location());
// If the click is in the highlight region, then highlight this download.
// Otherwise, remove the highlighting from any download.
- CRect select_rect(kDownloadIconOffset - download_util::kBigProgressIconOffset,
- 0,
- kDownloadIconOffset -
- download_util::kBigProgressIconOffset +
- download_util::kBigProgressIconSize + kInfoPadding +
- kFilenameSize,
- download_util::kBigProgressIconSize);
+ gfx::Rect select_rect(
+ kDownloadIconOffset - download_util::kBigProgressIconOffset,
+ 0,
+ kDownloadIconOffset - download_util::kBigProgressIconOffset +
+ download_util::kBigProgressIconSize + kInfoPadding + kFilenameSize,
+ download_util::kBigProgressIconSize);
// The position of the highlighted region does not take into account the
// View's UI layout so we have to manually mirror the position if the View is
// using a right-to-left UI layout.
gfx::Rect mirrored_rect(select_rect);
- select_rect.MoveToX(MirroredLeftPointForRect(mirrored_rect));
- if (select_rect.PtInRect(point)) {
+ select_rect.set_x(MirroredLeftPointForRect(mirrored_rect));
+ if (select_rect.Contains(point)) {
parent_->ItemBecameSelected(model_);
// Don't show the right-click menu if we are prompting the user for a
@@ -724,7 +723,7 @@
ChromeViews::View::ConvertPointToScreen(this, &point);
download_util::DownloadDestinationContextMenu menu(
- model_, GetViewContainer()->GetHWND(), point);
+ model_, GetViewContainer()->GetHWND(), point.ToPOINT());
}
} else {
parent_->ItemBecameSelected(NULL);
« no previous file with comments | « chrome/browser/views/download_item_view.cc ('k') | chrome/browser/views/frame/browser_view2.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698