summaryrefslogtreecommitdiffstats
path: root/dom/events/DataTransfer.h
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:13:27 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:13:27 +0000
commit40a355a42d4a9444dc753c04c6608dade2f06a23 (patch)
tree871fc667d2de662f171103ce5ec067014ef85e61 /dom/events/DataTransfer.h
parentAdding upstream version 124.0.1. (diff)
downloadfirefox-upstream/125.0.1.tar.xz
firefox-upstream/125.0.1.zip
Adding upstream version 125.0.1.upstream/125.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'dom/events/DataTransfer.h')
-rw-r--r--dom/events/DataTransfer.h25
1 files changed, 17 insertions, 8 deletions
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<nsCString>* 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<nsIGlobalObject> GetGlobal() const;
+ already_AddRefed<WindowContext> 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<nsCString>& 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<nsIAsyncGetClipboardData> mAsyncGetClipboardData;
+
// The items contained with the DataTransfer
RefPtr<DataTransferItemList> mItems;