#include "components/open_from_clipboard/clipboard_recent_content_generic.h"
#include <string>
#include "base/functional/bind.h"
#include "base/strings/string_util.h"
#include "build/build_config.h"
#include "ui/base/clipboard/clipboard.h"
#include "ui/base/data_transfer_policy/data_transfer_endpoint.h"
#include "url/url_util.h"
#if BUILDFLAG(IS_ANDROID)
#include "ui/base/clipboard/clipboard_android.h"
#endif
namespace {
const char* kAuthorizedSchemes[] = …;
void OnGetRecentImageFromClipboard(
ClipboardRecentContent::GetRecentImageCallback callback,
const std::vector<uint8_t>& png_data) { … }
bool HasRecentURLFromClipboard() { … }
bool HasRecentTextFromClipboard() { … }
}
ClipboardRecentContentGeneric::ClipboardRecentContentGeneric() = default;
ClipboardRecentContentGeneric::~ClipboardRecentContentGeneric() = default;
std::optional<GURL> ClipboardRecentContentGeneric::GetRecentURLFromClipboard() { … }
std::optional<std::u16string>
ClipboardRecentContentGeneric::GetRecentTextFromClipboard() { … }
void ClipboardRecentContentGeneric::GetRecentImageFromClipboard(
GetRecentImageCallback callback) { … }
std::optional<std::set<ClipboardContentType>>
ClipboardRecentContentGeneric::GetCachedClipboardContentTypes() { … }
bool ClipboardRecentContentGeneric::HasRecentImageFromClipboard() { … }
void ClipboardRecentContentGeneric::HasRecentContentFromClipboard(
std::set<ClipboardContentType> types,
HasDataCallback callback) { … }
void ClipboardRecentContentGeneric::GetRecentURLFromClipboard(
GetRecentURLCallback callback) { … }
void ClipboardRecentContentGeneric::GetRecentTextFromClipboard(
GetRecentTextCallback callback) { … }
base::TimeDelta ClipboardRecentContentGeneric::GetClipboardContentAge() const { … }
void ClipboardRecentContentGeneric::SuppressClipboardContent() { … }
void ClipboardRecentContentGeneric::ClearClipboardContent() { … }
bool ClipboardRecentContentGeneric::IsAppropriateSuggestion(const GURL& url) { … }