summaryrefslogtreecommitdiffstats
path: root/widget/windows/filedialog/WinFileDialogParent.h
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-12 05:43:14 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-12 05:43:14 +0000
commit8dd16259287f58f9273002717ec4d27e97127719 (patch)
tree3863e62a53829a84037444beab3abd4ed9dfc7d0 /widget/windows/filedialog/WinFileDialogParent.h
parentReleasing progress-linux version 126.0.1-1~progress7.99u1. (diff)
downloadfirefox-8dd16259287f58f9273002717ec4d27e97127719.tar.xz
firefox-8dd16259287f58f9273002717ec4d27e97127719.zip
Merging upstream version 127.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'widget/windows/filedialog/WinFileDialogParent.h')
-rw-r--r--widget/windows/filedialog/WinFileDialogParent.h15
1 files changed, 14 insertions, 1 deletions
diff --git a/widget/windows/filedialog/WinFileDialogParent.h b/widget/windows/filedialog/WinFileDialogParent.h
index a2c1197c55..a1eb547444 100644
--- a/widget/windows/filedialog/WinFileDialogParent.h
+++ b/widget/windows/filedialog/WinFileDialogParent.h
@@ -21,11 +21,14 @@
namespace mozilla::widget::filedialog {
-class WinFileDialogParent : public PWinFileDialogParent {
+class WinFileDialogParent final : private PWinFileDialogParent {
public:
using UtilityActorName = ::mozilla::UtilityActorName;
NS_INLINE_DECL_THREADSAFE_REFCOUNTING(WinFileDialogParent, override);
+ using ShowFileDialogPromise = Promise<Maybe<Results>>;
+ using ShowFolderDialogPromise = Promise<Maybe<nsString>>;
+
public:
WinFileDialogParent();
nsresult BindToUtilityProcess(
@@ -35,6 +38,16 @@ class WinFileDialogParent : public PWinFileDialogParent {
return UtilityActorName::WindowsFileDialog;
}
+ bool CanSend() const { return PWinFileDialogParent::CanSend(); }
+ void Close() { return PWinFileDialogParent::Close(); }
+
+ [[nodiscard]] RefPtr<ShowFileDialogPromise> ShowFileDialogImpl(
+ HWND parent, const FileDialogType& type,
+ mozilla::Span<Command const> commands);
+
+ [[nodiscard]] RefPtr<ShowFolderDialogPromise> ShowFolderDialogImpl(
+ HWND parent, mozilla::Span<Command const> commands);
+
private:
~WinFileDialogParent();