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

Unified Diff: ui/message_center/views/notification_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: ui/message_center/views/notification_view.cc
diff --git a/ui/message_center/views/notification_view.cc b/ui/message_center/views/notification_view.cc
index 671b42045bb9d8202761c8b9ca07a2bdf43bc32d..8f0c772f9766779726291d3471fac41566c03b37 100644
--- a/ui/message_center/views/notification_view.cc
+++ b/ui/message_center/views/notification_view.cc
@@ -523,11 +523,11 @@ void NotificationView::ScrollRectToVisible(const gfx::Rect& rect) {
views::View::ScrollRectToVisible(GetLocalBounds());
}
-views::View* NotificationView::GetEventHandlerForRect(const gfx::Rect& rect) {
+views::View* NotificationView::GetEventHandlerForRect(const gfx::RectF& rect) {
// TODO(tdanderson): Modify this function to support rect-based event
// targeting. Using the center point of |rect| preserves this function's
// expected behavior for the time being.
- gfx::Point point = rect.CenterPoint();
+ gfx::Point point = gfx::ToFlooredPoint(rect.CenterPoint());
// Want to return this for underlying views, otherwise GetCursor is not
// called. But buttons are exceptions, they'll have their own event handlings.

Powered by Google App Engine
This is Rietveld 408576698