Chromium Code Reviews| 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..43df8f2f178ff6825e97d1f18bd50c0dd4da7136 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| should be in display coordinates and in pixels. |
|
sky
2017/05/25 22:10:19
'should be' -> 'are in'
riajiang
2017/05/25 22:59:23
Done.
|
| + // |location_in_display| and |display_id| will be updated if the window we |
|
sky
2017/05/25 22:10:19
'will be updated' -> 'are updated'
riajiang
2017/05/25 22:59:23
Done.
|
| + // 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() {} |