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

Unified Diff: ui/aura/window.cc

Issue 178493003: aura: Make Window::HitTest() a private method. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 10 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/aura/window.cc
diff --git a/ui/aura/window.cc b/ui/aura/window.cc
index 5e135e63b5316980b870f79f99e8accf06431dd1..d15b7986b825139043240e21144b9b59688228e0 100644
--- a/ui/aura/window.cc
+++ b/ui/aura/window.cc
@@ -670,22 +670,6 @@ bool Window::ContainsPoint(const gfx::Point& local_point) const {
return gfx::Rect(bounds().size()).Contains(local_point);
}
-bool Window::HitTest(const gfx::Point& local_point) {
- gfx::Rect local_bounds(bounds().size());
- if (!delegate_ || !delegate_->HasHitTestMask())
- return local_bounds.Contains(local_point);
-
- gfx::Path mask;
- delegate_->GetHitTestMask(&mask);
-
- SkRegion clip_region;
- clip_region.setRect(local_bounds.x(), local_bounds.y(),
- local_bounds.width(), local_bounds.height());
- SkRegion mask_region;
- return mask_region.setPath(mask, clip_region) &&
- mask_region.contains(local_point.x(), local_point.y());
-}
-
Window* Window::GetEventHandlerForPoint(const gfx::Point& local_point) {
return GetWindowForPoint(local_point, true, true);
}
@@ -873,6 +857,22 @@ int64 Window::GetPropertyInternal(const void* key,
return iter->second.value;
}
+bool Window::HitTest(const gfx::Point& local_point) {
+ gfx::Rect local_bounds(bounds().size());
+ if (!delegate_ || !delegate_->HasHitTestMask())
+ return local_bounds.Contains(local_point);
+
+ gfx::Path mask;
+ delegate_->GetHitTestMask(&mask);
+
+ SkRegion clip_region;
+ clip_region.setRect(local_bounds.x(), local_bounds.y(),
+ local_bounds.width(), local_bounds.height());
+ SkRegion mask_region;
+ return mask_region.setPath(mask, clip_region) &&
+ mask_region.contains(local_point.x(), local_point.y());
+}
+
void Window::SetBoundsInternal(const gfx::Rect& new_bounds) {
gfx::Rect actual_new_bounds(new_bounds);

Powered by Google App Engine
This is Rietveld 408576698