// Copyright 2018 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef UI_OZONE_PLATFORM_WAYLAND_HOST_WAYLAND_DATA_SOURCE_H_ #define UI_OZONE_PLATFORM_WAYLAND_HOST_WAYLAND_DATA_SOURCE_H_ #include <cstdint> #include <string> #include <vector> #include "base/memory/raw_ptr.h" #include "base/notreached.h" #include "base/time/time.h" #include "ui/ozone/platform/wayland/common/wayland_object.h" struct wl_data_source; struct gtk_primary_selection_source; struct zwp_primary_selection_source_v1; namespace base { class TimeTicks; } namespace wl { template <typename T> class DataSource; } // namespace wl namespace ui { class WaylandConnection; // DataSource represents the source side of a DataOffer. It is created by the // source client in a data transfer and provides a way to describe the offered // data and a way to respond to requests to transfer the data. There are a few // variants of Wayland protocol objects and extensions supporting different // features. E.g: regular copy/paste and drag operations are implemented by // wl_data_source (along with its _device and _offer counterparts), etc. // Implementation wise, these variants are share a single class template, with // specializations defined for each underlying supported extensions. Below are // the type aliases for the variants currently supported. WaylandDataSource; GtkPrimarySelectionSource; ZwpPrimarySelectionSource; } // namespace ui namespace wl { // Template class implementing DataSource, whereas T is the underlying source // type, e.g: wl_data_source, gtk_primary_selection_source, etc. This class // is not supposed to be used directly, instead use the aliases defined above. template <typename T> class DataSource { … }; } // namespace wl #endif // UI_OZONE_PLATFORM_WAYLAND_HOST_WAYLAND_DATA_SOURCE_H_