diff --git a/browser/ui/file_dialog_win.cc b/browser/ui/file_dialog_win.cc index 043386cc21a..fa5f6912d02 100644 --- a/browser/ui/file_dialog_win.cc +++ b/browser/ui/file_dialog_win.cc @@ -249,6 +249,20 @@ bool ShowOpenDialog(atom::NativeWindow* parent_window, return true; } +void ShowOpenDialog(atom::NativeWindow* parent_window, + const std::string& title, + const base::FilePath& default_path, + int properties, + const OpenDialogCallback& callback) { + std::vector paths; + bool result = ShowOpenDialog(parent_window, + title, + default_path, + properties, + &paths); + callback.Run(result, paths); +} + bool ShowSaveDialog(atom::NativeWindow* parent_window, const std::string& title, const base::FilePath& default_path, @@ -292,4 +306,13 @@ bool ShowSaveDialog(atom::NativeWindow* parent_window, return true; } +void ShowSaveDialog(atom::NativeWindow* parent_window, + const std::string& title, + const base::FilePath& default_path, + const SaveDialogCallback& callback) { + base::FilePath path; + bool result = ShowSaveDialog(parent_window, title, default_path, &path); + callback.Run(result, path); +} + } // namespace file_dialog