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

Unified Diff: ash/wm/aura/wm_root_window_controller_aura.cc

Issue 1936223002: Refactors MultiWindowResizeController to use ash/wm/common (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nullptr Created 4 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: ash/wm/aura/wm_root_window_controller_aura.cc
diff --git a/ash/wm/aura/wm_root_window_controller_aura.cc b/ash/wm/aura/wm_root_window_controller_aura.cc
index ed6f18ccc1f8089df734e6a81030adb0f42fa9c2..976a3359954c13bae5f99d33ec5f047508129bf0 100644
--- a/ash/wm/aura/wm_root_window_controller_aura.cc
+++ b/ash/wm/aura/wm_root_window_controller_aura.cc
@@ -16,6 +16,8 @@
#include "ash/wm/workspace_controller.h"
#include "ui/aura/window.h"
#include "ui/aura/window_property.h"
+#include "ui/events/event_targeter.h"
+#include "ui/events/event_utils.h"
DECLARE_WINDOW_PROPERTY_TYPE(ash::wm::WmRootWindowControllerAura*);
@@ -101,6 +103,20 @@ void WmRootWindowControllerAura::ConfigureWidgetInitParamsForContainer(
root_window_controller_->GetRootWindow(), shell_container_id);
}
+WmWindow* WmRootWindowControllerAura::FindEventTarget(
+ const gfx::Point& location_in_screen) {
+ gfx::Point location_in_root =
+ GetWindow()->ConvertPointFromScreen(location_in_screen);
+ aura::Window* root = root_window_controller_->GetRootWindow();
+ ui::MouseEvent test_event(ui::ET_MOUSE_MOVED, location_in_root,
+ location_in_root, ui::EventTimeForNow(),
+ ui::EF_NONE, ui::EF_NONE);
+ ui::EventTarget* event_handler = static_cast<ui::EventTarget*>(root)
+ ->GetEventTargeter()
+ ->FindTargetForEvent(root, &test_event);
+ return WmWindowAura::Get(static_cast<aura::Window*>(event_handler));
+}
+
void WmRootWindowControllerAura::AddObserver(
WmRootWindowControllerObserver* observer) {
observers_.AddObserver(observer);

Powered by Google App Engine
This is Rietveld 408576698