diff options
Diffstat (limited to 'widget/windows/filedialog/WinFileDialogParent.h')
-rw-r--r-- | widget/windows/filedialog/WinFileDialogParent.h | 15 |
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(); |