#include "ui/ozone/platform/wayland/test/test_data_device.h"
#include <wayland-server-core.h>
#include <cstdint>
#include <memory>
#include "base/memory/raw_ptr.h"
#include "base/notreached.h"
#include "ui/ozone/platform/wayland/test/mock_surface.h"
#include "ui/ozone/platform/wayland/test/server_object.h"
#include "ui/ozone/platform/wayland/test/test_data_device_manager.h"
#include "ui/ozone/platform/wayland/test/test_data_offer.h"
#include "ui/ozone/platform/wayland/test/test_data_source.h"
#include "ui/ozone/platform/wayland/test/test_selection_device_manager.h"
#include "ui/ozone/platform/wayland/test/test_wayland_server_thread.h"
namespace wl {
namespace {
void DataDeviceStartDrag(wl_client* client,
wl_resource* resource,
wl_resource* source,
wl_resource* origin,
wl_resource* icon,
uint32_t serial) { … }
void DataDeviceRelease(wl_client* client, wl_resource* resource) { … }
struct WlDataDeviceImpl : public TestSelectionDevice::Delegate { … };
}
const struct wl_data_device_interface kTestDataDeviceImpl = …;
TestDataDevice::TestDataDevice(wl_resource* resource,
TestDataDeviceManager* manager)
: … { … }
TestDataDevice::~TestDataDevice() = default;
void TestDataDevice::SetSelection(TestDataSource* data_source,
uint32_t serial) { … }
TestDataOffer* TestDataDevice::CreateAndSendDataOffer() { … }
void TestDataDevice::StartDrag(TestDataSource* source,
MockSurface* origin,
uint32_t serial) { … }
void TestDataDevice::SendOfferAndEnter(MockSurface* origin,
const gfx::Point& location) { … }
void TestDataDevice::OnEnter(uint32_t serial,
wl_resource* surface,
wl_fixed_t x,
wl_fixed_t y,
TestDataOffer* data_offer) { … }
void TestDataDevice::OnLeave() { … }
void TestDataDevice::OnMotion(uint32_t time, wl_fixed_t x, wl_fixed_t y) { … }
void TestDataDevice::OnDrop() { … }
}