summaryrefslogtreecommitdiffstats
path: root/dom/base/nsGlobalWindowInner.h
diff options
context:
space:
mode:
Diffstat (limited to 'dom/base/nsGlobalWindowInner.h')
-rw-r--r--dom/base/nsGlobalWindowInner.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/dom/base/nsGlobalWindowInner.h b/dom/base/nsGlobalWindowInner.h
index 100dbb9699..15fbc4259f 100644
--- a/dom/base/nsGlobalWindowInner.h
+++ b/dom/base/nsGlobalWindowInner.h
@@ -104,6 +104,7 @@ class ClientSource;
class Console;
class Crypto;
class CustomElementRegistry;
+class DataTransfer;
class DocGroup;
class External;
class Function;
@@ -127,6 +128,7 @@ class WebTaskScheduler;
class WebTaskSchedulerMainThread;
class SpeechSynthesis;
class Timeout;
+class TrustedTypePolicyFactory;
class VisualViewport;
class VRDisplay;
enum class VRDisplayEventReason : uint8_t;
@@ -1254,11 +1256,18 @@ class nsGlobalWindowInner final : public mozilla::dom::EventTarget,
virtual JS::loader::ModuleLoaderBase* GetModuleLoader(
JSContext* aCx) override;
+ mozilla::dom::TrustedTypePolicyFactory* TrustedTypes();
+
+ void SetCurrentPasteDataTransfer(mozilla::dom::DataTransfer* aDataTransfer);
+ mozilla::dom::DataTransfer* GetCurrentPasteDataTransfer() const;
+
private:
RefPtr<mozilla::dom::ContentMediaController> mContentMediaController;
RefPtr<mozilla::dom::WebTaskSchedulerMainThread> mWebTaskScheduler;
+ RefPtr<mozilla::dom::TrustedTypePolicyFactory> mTrustedTypePolicyFactory;
+
protected:
// Whether we need to care about orientation changes.
bool mHasOrientationChangeListeners : 1;
@@ -1460,6 +1469,10 @@ class nsGlobalWindowInner final : public mozilla::dom::EventTarget,
mGroupMessageManagers{1};
} mChromeFields;
+ // Cache the DataTransfer created for a paste event, this will be reset after
+ // the event is dispatched.
+ RefPtr<mozilla::dom::DataTransfer> mCurrentPasteDataTransfer;
+
// These fields are used by the inner and outer windows to prevent
// programatically moving the window while the mouse is down.
static bool sMouseDown;