#include "chrome/browser/enterprise/data_protection/paste_allowed_request.h"
#include "chrome/browser/enterprise/data_protection/data_protection_clipboard_utils.h"
#include "content/public/browser/global_routing_id.h"
#include "content/public/browser/render_frame_host.h"
namespace enterprise_data_protection {
namespace {
PasteAllowedRequest::RequestsMap& RequestsMapStorage() { … }
void FinishPasteIfAllowed(
const content::GlobalRenderFrameHostId& rfh_id,
const ui::ClipboardSequenceNumberToken& seqno,
std::optional<content::ClipboardPasteData> clipboard_paste_data) { … }
}
constexpr base::TimeDelta PasteAllowedRequest::kIsPasteAllowedRequestTooOld = …;
void PasteAllowedRequest::StartPasteAllowedRequest(
const content::ClipboardEndpoint& source,
const content::ClipboardEndpoint& destination,
const content::ClipboardMetadata& metadata,
content::ClipboardPasteData clipboard_paste_data,
IsClipboardPasteAllowedCallback callback) { … }
void PasteAllowedRequest::CleanupObsoleteRequests() { … }
void PasteAllowedRequest::CleanupRequestsForTesting() { … }
void PasteAllowedRequest::AddRequestToCacheForTesting(
content::GlobalRenderFrameHostId rfh_id,
ui::ClipboardSequenceNumberToken seqno,
PasteAllowedRequest request) { … }
size_t PasteAllowedRequest::requests_count_for_testing() { … }
PasteAllowedRequest::PasteAllowedRequest() = default;
PasteAllowedRequest::PasteAllowedRequest(PasteAllowedRequest&&) = default;
PasteAllowedRequest& PasteAllowedRequest::operator=(PasteAllowedRequest&&) =
default;
PasteAllowedRequest::~PasteAllowedRequest() = default;
bool PasteAllowedRequest::AddCallback(
IsClipboardPasteAllowedCallback callback) { … }
void PasteAllowedRequest::AddData(content::ClipboardPasteData data) { … }
void PasteAllowedRequest::InvokeCallback(
content::ClipboardPasteData data,
IsClipboardPasteAllowedCallback callback) { … }
void PasteAllowedRequest::Complete(
std::optional<content::ClipboardPasteData> data) { … }
bool PasteAllowedRequest::IsObsolete(base::Time now) { … }
base::Time PasteAllowedRequest::completed_time() const { … }
void PasteAllowedRequest::InvokeCallbacks() { … }
}