From 40a355a42d4a9444dc753c04c6608dade2f06a23 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 19 Apr 2024 03:13:27 +0200 Subject: Adding upstream version 125.0.1. Signed-off-by: Daniel Baumann --- dom/events/DataTransfer.h | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) (limited to 'dom/events/DataTransfer.h') diff --git a/dom/events/DataTransfer.h b/dom/events/DataTransfer.h index ea0368216a..7ff2bff54b 100644 --- a/dom/events/DataTransfer.h +++ b/dom/events/DataTransfer.h @@ -23,6 +23,7 @@ #include "mozilla/dom/DataTransferItemList.h" #include "mozilla/dom/File.h" +class nsIAsyncGetClipboardData; class nsINode; class nsITransferable; class nsILoadContext; @@ -386,14 +387,6 @@ class DataTransfer final : public nsISupports, public nsWrapperCache { } bool MozShowFailAnimation() const { return mShowFailAnimation; } - // Retrieve a list of clipboard formats supported - // - // If kFileMime is supported, then it will be placed either at - // index 0 or at index 1 in aResult - static void GetExternalClipboardFormats(const int32_t& aWhichClipboard, - const bool& aPlainTextOnly, - nsTArray* aResult); - // Retrieve a list of supporting formats in aTransferable. // // If kFileMime is supported, then it will be placed either at @@ -428,7 +421,18 @@ class DataTransfer final : public nsISupports, public nsWrapperCache { already_AddRefed GetGlobal() const; + already_AddRefed GetWindowContext() const; + + nsIAsyncGetClipboardData* GetAsyncGetClipboardData() const; + protected: + // Retrieve a list of clipboard formats supported + // + // If kFileMime is supported, then it will be placed either at + // index 0 or at index 1 in aResult + void GetExternalClipboardFormats(const bool& aPlainTextOnly, + nsTArray& aResult); + // caches text and uri-list data formats that exist in the drag service or // clipboard for retrieval later. nsresult CacheExternalData(const char* aFormat, uint32_t aIndex, @@ -506,6 +510,11 @@ class DataTransfer final : public nsISupports, public nsWrapperCache { // drag and drop. int32_t mClipboardType; + // The nsIAsyncGetClipboardData that is used for getting clipboard formats. + // XXXedgar we should get the actual data from this in the future, see bug + // 1879401. + nsCOMPtr mAsyncGetClipboardData; + // The items contained with the DataTransfer RefPtr mItems; -- cgit v1.2.3