Move ui::DragDropTypes::DragEventSource to Mojo
This CL adds ui.mojom.DragEventSource and replaces all the original uses
with it. It's a precursor CL for porting DragHostMsg_StartDragging to
Mojo.
Bug: 1039255
Change-Id: I4c3cf9347b45a681ec1ae9b1f6f79eaf1c1ba99d
Cq-Do-Not-Cancel-Tryjobs: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2315678
Commit-Queue: Henrique Ferreiro <[email protected]>
Reviewed-by: Kinuko Yasuda <[email protected]>
Reviewed-by: Scott Violet <[email protected]>
Cr-Commit-Position: refs/heads/master@{#794500}
diff --git a/components/exo/wayland/wl_data_device_manager.cc b/components/exo/wayland/wl_data_device_manager.cc
index 5d08696c85..a34b13c 100644
--- a/components/exo/wayland/wl_data_device_manager.cc
+++ b/components/exo/wayland/wl_data_device_manager.cc
@@ -20,6 +20,7 @@
#include "components/exo/display.h"
#include "components/exo/wayland/serial_tracker.h"
#include "components/exo/wayland/server_util.h"
+#include "ui/base/dragdrop/mojom/drag_drop_types.mojom-shared.h"
namespace exo {
namespace wayland {
@@ -310,14 +311,12 @@
}
if (event_type == wayland::SerialTracker::EventType::POINTER_BUTTON_DOWN &&
serial_tracker_->GetPointerDownSerial() == serial) {
- data_device->StartDrag(
- source, origin, icon,
- ui::DragDropTypes::DragEventSource::DRAG_EVENT_SOURCE_MOUSE);
+ data_device->StartDrag(source, origin, icon,
+ ui::mojom::DragEventSource::kMouse);
} else if (event_type == wayland::SerialTracker::EventType::TOUCH_DOWN &&
serial_tracker_->GetTouchDownSerial() == serial) {
- data_device->StartDrag(
- source, origin, icon,
- ui::DragDropTypes::DragEventSource::DRAG_EVENT_SOURCE_TOUCH);
+ data_device->StartDrag(source, origin, icon,
+ ui::mojom::DragEventSource::kTouch);
} else {
LOG(ERROR) << "The serial passed to StartDrag does not match its "
"expected types.";