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

Unified Diff: chrome/browser/ui/views/frame/opaque_browser_frame_view.cc

Issue 265713007: views: Update event-related API to use PointF/RectF instead of Point/Rect. Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 8 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
Index: chrome/browser/ui/views/frame/opaque_browser_frame_view.cc
diff --git a/chrome/browser/ui/views/frame/opaque_browser_frame_view.cc b/chrome/browser/ui/views/frame/opaque_browser_frame_view.cc
index 7713dc478595c7b4d7bd2b4784ddbbfb2ae0c5e2..8851c4bc491d69c0e36213d381f071148627ff03 100644
--- a/chrome/browser/ui/views/frame/opaque_browser_frame_view.cc
+++ b/chrome/browser/ui/views/frame/opaque_browser_frame_view.cc
@@ -290,7 +290,7 @@ void OpaqueBrowserFrameView::UpdateWindowTitle() {
///////////////////////////////////////////////////////////////////////////////
// OpaqueBrowserFrameView, views::View overrides:
-bool OpaqueBrowserFrameView::HitTestRect(const gfx::Rect& rect) const {
+bool OpaqueBrowserFrameView::HitTestRect(const gfx::RectF& rect) const {
if (!views::View::HitTestRect(rect)) {
// |rect| is outside OpaqueBrowserFrameView's bounds.
return false;
@@ -311,10 +311,8 @@ bool OpaqueBrowserFrameView::HitTestRect(const gfx::Rect& rect) const {
if (!tabstrip || !browser_view()->IsTabStripVisible())
return false;
- gfx::RectF rect_in_tabstrip_coords_f(rect);
- View::ConvertRectToTarget(this, tabstrip, &rect_in_tabstrip_coords_f);
- gfx::Rect rect_in_tabstrip_coords = gfx::ToEnclosingRect(
- rect_in_tabstrip_coords_f);
+ gfx::RectF rect_in_tabstrip_coords(rect);
+ View::ConvertRectToTarget(this, tabstrip, &rect_in_tabstrip_coords);
if (rect_in_tabstrip_coords.bottom() > tabstrip->GetLocalBounds().bottom()) {
// |rect| is below the tabstrip.
return false;
@@ -333,10 +331,7 @@ bool OpaqueBrowserFrameView::HitTestRect(const gfx::Rect& rect) const {
gfx::RectF rect_in_window_switcher_coords_f(rect);
tdresser 2014/05/02 13:19:06 |rect_in_window_switcher_coords_f| should probably
View::ConvertRectToTarget(this, window_switcher_button,
&rect_in_window_switcher_coords_f);
- gfx::Rect rect_in_window_switcher_coords = gfx::ToEnclosingRect(
- rect_in_window_switcher_coords_f);
-
- if (window_switcher_button->HitTestRect(rect_in_window_switcher_coords))
+ if (window_switcher_button->HitTestRect(rect_in_window_switcher_coords_f))
return false;
}

Powered by Google App Engine
This is Rietveld 408576698