[ozone/wayland] Add missing Drag and Drop support. |
|||
Issue description[ozone/wayland] Add missing Drag and Drop support.
,
Aug 17
,
Aug 17
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/514383a2188ae3b4f2fdc7f466abfa3ebb9880af commit 514383a2188ae3b4f2fdc7f466abfa3ebb9880af Author: Julie Jeongeun Kim <jkim@igalia.com> Date: Fri Aug 17 13:45:32 2018 [ozone/wayland] Add a helper function to WaylandDataDevice to read the data from FD It moves the code to read the data from FD to 'ReadDataFromFD' in WaylandDataDevice to reuse it for drag-and-drop, as WaylandDataDevice is the class to handle not only copy-and-paste but drag-and-drop and drag-and-drop needs to read the data from FD as well. It doesn't bring behavioral changes. Bug: 578890, 875164 Change-Id: I460ab9df2b4d32bbdb0e71c753cb19c572df12ab Reviewed-on: https://chromium-review.googlesource.com/1179505 Reviewed-by: Maksim Sisov <msisov@igalia.com> Reviewed-by: Antonio Gomes <tonikitoo@igalia.com> Commit-Queue: Julie Jeongeun Kim <jkim@igalia.com> Cr-Commit-Position: refs/heads/master@{#584047} [modify] https://crrev.com/514383a2188ae3b4f2fdc7f466abfa3ebb9880af/ui/ozone/platform/wayland/wayland_data_device.cc [modify] https://crrev.com/514383a2188ae3b4f2fdc7f466abfa3ebb9880af/ui/ozone/platform/wayland/wayland_data_device.h
,
Aug 19
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/2f1d779496e6d7caefd1780f4946aced1e22401c commit 2f1d779496e6d7caefd1780f4946aced1e22401c Author: Julie Jeongeun Kim <jkim@igalia.com> Date: Sun Aug 19 02:46:10 2018 [ozone/wayland] Add wayland_util.cc/h to create utiliy APIs It introduces wayland_util.cc/h and moves the code to create shared memory buffer and draw bitmap on it from WaylandCursor, as it could be used generally rather than specific to cursor area. On upcoming patch for drag and drop on Wayland, it's also required to pass the drag icon surface to Wayland. It doesn't bring behavioral changes. Bug: 578890, 875164 Change-Id: I0cd4603c2abacaa899a9fcf19d97186d6f493146 Reviewed-on: https://chromium-review.googlesource.com/1179487 Commit-Queue: Julie Jeongeun Kim <jkim@igalia.com> Reviewed-by: Antonio Gomes <tonikitoo@igalia.com> Reviewed-by: Maksim Sisov <msisov@igalia.com> Cr-Commit-Position: refs/heads/master@{#584328} [modify] https://crrev.com/2f1d779496e6d7caefd1780f4946aced1e22401c/ui/ozone/platform/wayland/BUILD.gn [modify] https://crrev.com/2f1d779496e6d7caefd1780f4946aced1e22401c/ui/ozone/platform/wayland/wayland_cursor.cc [modify] https://crrev.com/2f1d779496e6d7caefd1780f4946aced1e22401c/ui/ozone/platform/wayland/wayland_cursor.h [add] https://crrev.com/2f1d779496e6d7caefd1780f4946aced1e22401c/ui/ozone/platform/wayland/wayland_util.cc [add] https://crrev.com/2f1d779496e6d7caefd1780f4946aced1e22401c/ui/ozone/platform/wayland/wayland_util.h
,
Sep 7
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/e3a08235ae90742349cac20ae2535a079b0c31d5 commit e3a08235ae90742349cac20ae2535a079b0c31d5 Author: Julie Jeongeun Kim <jkim@igalia.com> Date: Fri Sep 07 00:01:18 2018 [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/1176891 Reviewed-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} [modify] https://crrev.com/e3a08235ae90742349cac20ae2535a079b0c31d5/ui/ozone/platform/wayland/BUILD.gn [modify] https://crrev.com/e3a08235ae90742349cac20ae2535a079b0c31d5/ui/ozone/platform/wayland/DEPS [modify] https://crrev.com/e3a08235ae90742349cac20ae2535a079b0c31d5/ui/ozone/platform/wayland/fake_server.cc [modify] https://crrev.com/e3a08235ae90742349cac20ae2535a079b0c31d5/ui/ozone/platform/wayland/fake_server.h [modify] https://crrev.com/e3a08235ae90742349cac20ae2535a079b0c31d5/ui/ozone/platform/wayland/wayland_connection.cc [modify] https://crrev.com/e3a08235ae90742349cac20ae2535a079b0c31d5/ui/ozone/platform/wayland/wayland_connection.h [modify] https://crrev.com/e3a08235ae90742349cac20ae2535a079b0c31d5/ui/ozone/platform/wayland/wayland_data_device.cc [modify] https://crrev.com/e3a08235ae90742349cac20ae2535a079b0c31d5/ui/ozone/platform/wayland/wayland_data_device.h [modify] https://crrev.com/e3a08235ae90742349cac20ae2535a079b0c31d5/ui/ozone/platform/wayland/wayland_data_device_unittest.cc [modify] https://crrev.com/e3a08235ae90742349cac20ae2535a079b0c31d5/ui/ozone/platform/wayland/wayland_data_offer.cc [modify] https://crrev.com/e3a08235ae90742349cac20ae2535a079b0c31d5/ui/ozone/platform/wayland/wayland_data_offer.h [modify] https://crrev.com/e3a08235ae90742349cac20ae2535a079b0c31d5/ui/ozone/platform/wayland/wayland_data_source.cc [modify] https://crrev.com/e3a08235ae90742349cac20ae2535a079b0c31d5/ui/ozone/platform/wayland/wayland_data_source.h [modify] https://crrev.com/e3a08235ae90742349cac20ae2535a079b0c31d5/ui/ozone/platform/wayland/wayland_object.cc [modify] https://crrev.com/e3a08235ae90742349cac20ae2535a079b0c31d5/ui/ozone/platform/wayland/wayland_window.cc [modify] https://crrev.com/e3a08235ae90742349cac20ae2535a079b0c31d5/ui/ozone/platform/wayland/wayland_window.h
,
Oct 26
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/67a7e39e2f2db492fb85f025607465b0b991631f commit 67a7e39e2f2db492fb85f025607465b0b991631f Author: Julie Jeongeun Kim <jkim@igalia.com> Date: Fri Oct 26 07:32:21 2018 [Ozone] Implement starting dragging with ozone It introduces DesktopDragDropClientOzone class to manage drag-and-drop. 'DesktopWindowTreeHostPlatform::CreateDragDropClient' creates DesktopDragDropClientOzone and it's connected to platform windows and has an internal runloop like other DragDropClients. It adds WmDragHandler and sets the platform window as a WmDragHandler. When DesktopWindowTreeHostPlatform starts dragging, it gets WmDragHandler through the platform window and sends the dragging request to the platform layer. It implements 'StartDragAndDrop' of 'DragDropClient' for Ozone and adds 'OnDragSessionClosed' to DesktopDragDropClientOzone to finish dragging session. As Wayland platform window has the drag and drop implementation at the platform layer already, it extends WaylandWindow interfaces, StartDrag. With this change, Ozone/Wayland build can start dragging from an application to the Chromium browser. Test=DesktopDragDropClientOzoneTest.StartDrag BUG=875164 Change-Id: I4ebaedfae5f6affb80b4d6c7c6d8ed3ba86ef4ca Reviewed-on: https://chromium-review.googlesource.com/c/1218446 Reviewed-by: Sadrul Chowdhury <sadrul@chromium.org> Commit-Queue: Julie Jeongeun Kim <jkim@igalia.com> Cr-Commit-Position: refs/heads/master@{#603024} [modify] https://crrev.com/67a7e39e2f2db492fb85f025607465b0b991631f/ui/compositor/test/test_compositor_host_ozone.cc [modify] https://crrev.com/67a7e39e2f2db492fb85f025607465b0b991631f/ui/ozone/platform/wayland/wayland_window.cc [modify] https://crrev.com/67a7e39e2f2db492fb85f025607465b0b991631f/ui/ozone/platform/wayland/wayland_window.h [modify] https://crrev.com/67a7e39e2f2db492fb85f025607465b0b991631f/ui/platform_window/platform_window_handler/BUILD.gn [add] https://crrev.com/67a7e39e2f2db492fb85f025607465b0b991631f/ui/platform_window/platform_window_handler/wm_drag_handler.cc [add] https://crrev.com/67a7e39e2f2db492fb85f025607465b0b991631f/ui/platform_window/platform_window_handler/wm_drag_handler.h [modify] https://crrev.com/67a7e39e2f2db492fb85f025607465b0b991631f/ui/views/BUILD.gn [add] https://crrev.com/67a7e39e2f2db492fb85f025607465b0b991631f/ui/views/widget/desktop_aura/desktop_drag_drop_client_ozone.cc [add] https://crrev.com/67a7e39e2f2db492fb85f025607465b0b991631f/ui/views/widget/desktop_aura/desktop_drag_drop_client_ozone.h [add] https://crrev.com/67a7e39e2f2db492fb85f025607465b0b991631f/ui/views/widget/desktop_aura/desktop_drag_drop_client_ozone_unittest.cc [modify] https://crrev.com/67a7e39e2f2db492fb85f025607465b0b991631f/ui/views/widget/desktop_aura/desktop_window_tree_host_platform.cc
,
Jan 17
(5 days ago)
|
|||
►
Sign in to add a comment |
|||
Comment 1 by msi...@igalia.com
, Aug 17