[ozone/wayland] Implement 'Drag and Drop' on Wayland
This CL is a part of changes for 'Drag and Drop' on wayland and extends WaylandDataDevice, WaylandDataSource and WaylandDataOffer. WaylandDataDevice registers event listeners for 'drag and drop', has 'StartDrag' API connected with 'wl_data_device_start_drag' and includes reading the data from Wayland. WaylandDataSource registers event listeners for 'drag and drop' to handle at a source side and writes the data to the fd delivered from Wayland when it gets 'OnSend' event. WaylandDataOffer gets the operation decided by Wayland and requests the offered data by Wayland. FakeServer is also extended to support the various compositor side functionalities needed so that tests 'drag-and-drop' in wayland_data_device_unittest.cc run. MockDataDevice, MockDataOffer and MockDataSource classes are extended, implementing the respective Wayland compositor hooks to communicate with Wayland clients (eg Ozone/Wayland). Flow: 1) Sending dragging 'WaylandDataDevice::StartDrag' triggers the drag action to Wayland, Wayland requests the data through 'WaylandDataSource::OnSend' and 'WaylandDataSource' listens the status through 'OnCancel' or 'OnDnDDropPerformed'. 2) Getting dragging 'WaylandDataDevice' listens drag-and-drop status such as entered/ moved/dropped/left. When the drop action is performed, 'WaylandDataDevice' reads the data using 'WaylandDataOffer'. BUG=875164 TEST=ozone_unittests Change-Id: Ic1ad80fce4ac396385f3ba6780839ef31d717683 Reviewed-on: https://chromium-review.googlesource.com/1176891Reviewed-by:Robert Kroeger <rjkroege@chromium.org> Reviewed-by:
Sadrul Chowdhury <sadrul@chromium.org> Reviewed-by:
Antonio Gomes <tonikitoo@igalia.com> Reviewed-by:
Maksim Sisov <msisov@igalia.com> Commit-Queue: Julie Jeongeun Kim <jkim@igalia.com> Cr-Commit-Position: refs/heads/master@{#589375}
Showing
This diff is collapsed.
Please register or sign in to comment