diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-12 05:35:29 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-12 05:35:29 +0000 |
commit | 59203c63bb777a3bacec32fb8830fba33540e809 (patch) | |
tree | 58298e711c0ff0575818c30485b44a2f21bf28a0 /toolkit/components/windowwatcher | |
parent | Adding upstream version 126.0.1. (diff) | |
download | firefox-59203c63bb777a3bacec32fb8830fba33540e809.tar.xz firefox-59203c63bb777a3bacec32fb8830fba33540e809.zip |
Adding upstream version 127.0.upstream/127.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'toolkit/components/windowwatcher')
-rw-r--r-- | toolkit/components/windowwatcher/nsIOpenWindowInfo.idl | 6 | ||||
-rw-r--r-- | toolkit/components/windowwatcher/nsOpenWindowInfo.cpp | 8 |
2 files changed, 14 insertions, 0 deletions
diff --git a/toolkit/components/windowwatcher/nsIOpenWindowInfo.idl b/toolkit/components/windowwatcher/nsIOpenWindowInfo.idl index a8347c5a1a..c0edb18536 100644 --- a/toolkit/components/windowwatcher/nsIOpenWindowInfo.idl +++ b/toolkit/components/windowwatcher/nsIOpenWindowInfo.idl @@ -74,4 +74,10 @@ interface nsIOpenWindowInfo : nsISupports { /* Callback to invoke when the browsing context for a new window is ready. */ [notxpcom, nostdcall] nsIBrowsingContextReadyCallback browsingContextReadyCallback(); + + /** + * When creating a window fails, we will be called to notify an error via + * callback. If no callback, do nothing. + */ + void cancel(); }; diff --git a/toolkit/components/windowwatcher/nsOpenWindowInfo.cpp b/toolkit/components/windowwatcher/nsOpenWindowInfo.cpp index 4374090075..042ee45f4e 100644 --- a/toolkit/components/windowwatcher/nsOpenWindowInfo.cpp +++ b/toolkit/components/windowwatcher/nsOpenWindowInfo.cpp @@ -57,6 +57,14 @@ nsOpenWindowInfo::BrowsingContextReadyCallback() { return mBrowsingContextReadyCallback; } +NS_IMETHODIMP nsOpenWindowInfo::Cancel() { + if (mBrowsingContextReadyCallback) { + mBrowsingContextReadyCallback->BrowsingContextReady(nullptr); + mBrowsingContextReadyCallback = nullptr; + } + return NS_OK; +} + NS_IMPL_ISUPPORTS(nsBrowsingContextReadyCallback, nsIBrowsingContextReadyCallback) |