summaryrefslogtreecommitdiffstats
path: root/chrome/browser/views/download_tab_view.cc
diff options
context:
space:
mode:
authorben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2008-10-14 20:58:44 +0000
committerben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2008-10-14 20:58:44 +0000
commit96b667d273c25e55150785848942c51f1a98851b (patch)
tree21ad2f8bc3a2148a517998f4ebb0157b22a75082 /chrome/browser/views/download_tab_view.cc
parentdf40752a0913948b49086fee421b0d019f7de8da (diff)
downloadchromium_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/browser/views/download_tab_view.cc')
-rw-r--r--chrome/browser/views/download_tab_view.cc21
1 files changed, 10 insertions, 11 deletions
diff --git a/chrome/browser/views/download_tab_view.cc b/chrome/browser/views/download_tab_view.cc
index 679aa54..e4edec9 100644
--- a/chrome/browser/views/download_tab_view.cc
+++ b/chrome/browser/views/download_tab_view.cc
@@ -697,24 +697,23 @@ void DownloadItemTabView::DidChangeBounds(const CRect& previous,
}
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 @@ bool DownloadItemTabView::OnMousePressed(const ChromeViews::MouseEvent& event) {
ChromeViews::View::ConvertPointToScreen(this, &point);
download_util::DownloadDestinationContextMenu menu(
- model_, GetViewContainer()->GetHWND(), point);
+ model_, GetViewContainer()->GetHWND(), point.ToPOINT());
}
} else {
parent_->ItemBecameSelected(NULL);