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

Unified Diff: ui/aura/window.cc

Issue 10831361: Draggable region support for frameless app window on CrOS. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Use ShouldDescendIntoChildForEventHandling Created 8 years, 4 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 a36a9f169fd98761fc66201bbbd17ebe43415a24..04dbba6a19b1ceecad789901979a89c4c5e66980 100644
--- a/ui/aura/window.cc
+++ b/ui/aura/window.cc
@@ -501,12 +501,13 @@ bool Window::HitTest(const gfx::Point& local_point) {
mask_region.contains(local_point.x(), local_point.y());
}
-Window* Window::GetEventHandlerForPoint(const gfx::Point& local_point) {
- return GetWindowForPoint(local_point, true, true);
+Window* Window::GetEventHandlerForPoint(const gfx::Point& local_point,
+ ui::EventType event_type) {
+ return GetWindowForPoint(local_point, true, event_type);
}
Window* Window::GetTopWindowContainingPoint(const gfx::Point& local_point) {
- return GetWindowForPoint(local_point, false, false);
+ return GetWindowForPoint(local_point, false, ui::ET_UNKNOWN);
}
Window* Window::GetToplevelWindow() {
@@ -700,10 +701,11 @@ void Window::SchedulePaint() {
Window* Window::GetWindowForPoint(const gfx::Point& local_point,
bool return_tightest,
- bool for_event_handling) {
+ ui::EventType event_type) {
if (!IsVisible())
return NULL;
+ bool for_event_handling = event_type != ui::ET_UNKNOWN;
if ((for_event_handling && !HitTest(local_point)) ||
(!for_event_handling && !ContainsPoint(local_point)))
return NULL;
@@ -745,13 +747,13 @@ Window* Window::GetWindowForPoint(const gfx::Point& local_point,
ConvertPointToTarget(this, child, &point_in_child_coords);
if (for_event_handling && delegate_ &&
!delegate_->ShouldDescendIntoChildForEventHandling(
- child, local_point)) {
+ child, local_point, event_type)) {
continue;
}
Window* match = child->GetWindowForPoint(point_in_child_coords,
return_tightest,
- for_event_handling);
+ event_type);
if (match)
return match;
}

Powered by Google App Engine
This is Rietveld 408576698