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

Unified Diff: services/ui/ws/event_dispatcher_delegate.h

Issue 2778943005: Keep root_location to be in pixels and display coordinates in WS. (Closed)
Patch Set: const Created 3 years, 7 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 | « services/ui/ws/event_dispatcher.cc ('k') | services/ui/ws/event_dispatcher_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/ui/ws/event_dispatcher_delegate.h
diff --git a/services/ui/ws/event_dispatcher_delegate.h b/services/ui/ws/event_dispatcher_delegate.h
index 69b7a1b40ee9d39917bf6703ce2d321111ae48c1..28a2a0a123f12e8aeb0dc4ba1796517bb9833715 100644
--- a/services/ui/ws/event_dispatcher_delegate.h
+++ b/services/ui/ws/event_dispatcher_delegate.h
@@ -31,11 +31,13 @@ class EventDispatcherDelegate {
};
virtual void OnAccelerator(uint32_t accelerator,
+ const int64_t display_id,
const ui::Event& event,
AcceleratorPhase phase) = 0;
virtual void SetFocusedWindowFromEventDispatcher(ServerWindow* window) = 0;
- virtual ServerWindow* GetFocusedWindowForEventDispatcher() = 0;
+ virtual ServerWindow* GetFocusedWindowForEventDispatcher(
+ const int64_t display_id) = 0;
// Called when capture should be set on the native display. |window| is the
// window capture is being set on.
@@ -55,11 +57,13 @@ class EventDispatcherDelegate {
virtual void OnCaptureChanged(ServerWindow* new_capture,
ServerWindow* old_capture) = 0;
- virtual void OnMouseCursorLocationChanged(const gfx::Point& point) = 0;
+ virtual void OnMouseCursorLocationChanged(const gfx::Point& point,
+ const int64_t display_id) = 0;
// Dispatches an event to the specific client.
virtual void DispatchInputEventToWindow(ServerWindow* target,
ClientSpecificId client_id,
+ const int64_t display_id,
const ui::Event& event,
Accelerator* accelerator) = 0;
@@ -69,14 +73,20 @@ class EventDispatcherDelegate {
bool in_nonclient_area) = 0;
// Returns the window to start searching from at the specified location, or
- // null if there is a no window containing |location|. |location| should be in
- // screen coordinates and if a window is returned then |location| will be
- // updated to be relative to the origin of the window.
- virtual ServerWindow* GetRootWindowContaining(gfx::Point* location) = 0;
+ // null if there is a no window containing |location_in_display|.
+ // |location_in_display| is in display coordinates and in pixels.
+ // |location_in_display| and |display_id| are updated if the window we
+ // found is on a different display than the originated display.
+ // TODO(riajiang): No need to update |location_in_display| and |display_id|
+ // after ozone drm can tell us the right display the cursor is on for
+ // drag-n-drop events. crbug.com/726470
+ virtual ServerWindow* GetRootWindowContaining(gfx::Point* location_in_display,
+ int64_t* display_id) = 0;
// Called when event dispatch could not find a target. OnAccelerator may still
// be called.
- virtual void OnEventTargetNotFound(const ui::Event& event) = 0;
+ virtual void OnEventTargetNotFound(const ui::Event& event,
+ const int64_t display_id) = 0;
protected:
virtual ~EventDispatcherDelegate() {}
« no previous file with comments | « services/ui/ws/event_dispatcher.cc ('k') | services/ui/ws/event_dispatcher_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698