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

Unified Diff: ash/wm/app_list_controller.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
« no previous file with comments | « no previous file | ash/wm/app_list_controller_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/app_list_controller.cc
diff --git a/ash/wm/app_list_controller.cc b/ash/wm/app_list_controller.cc
index e4cd957c39258adc24503afe786952ee1e49522f..1db06095b6be9ae3c32f7fdcc10ea2c77717c72f 100644
--- a/ash/wm/app_list_controller.cc
+++ b/ash/wm/app_list_controller.cc
@@ -289,6 +289,9 @@ void AppListController::ScheduleAnimation() {
}
void AppListController::ProcessLocatedEvent(ui::LocatedEvent* event) {
+ if (!view_ || !is_visible_)
+ return;
+
// If the event happened on a menu, then the event should not close the app
// list.
aura::Window* target = static_cast<aura::Window*>(event->target());
@@ -307,16 +310,9 @@ void AppListController::ProcessLocatedEvent(ui::LocatedEvent* event) {
}
}
- if (view_ && is_visible_) {
- aura::Window* window = view_->GetWidget()->GetNativeView();
- gfx::Point window_local_point(event->root_location());
- aura::Window::ConvertPointToTarget(window->GetRootWindow(),
- window,
- &window_local_point);
- // Use HitTest to respect the hit test mask of the bubble.
- if (!window->HitTest(window_local_point))
- SetVisible(false, window);
- }
+ aura::Window* window = view_->GetWidget()->GetNativeView();
sky 2014/02/24 21:04:38 Is the coordinate system here right?
sadrul 2014/02/24 21:10:16 The altered code doesn't actually deal with coordi
sky 2014/02/24 21:11:38 Indeed. The old code was doing conversions though.
+ if (!window->Contains(target))
+ SetVisible(false, window);
}
void AppListController::UpdateBounds() {
« no previous file with comments | « no previous file | ash/wm/app_list_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698