feat: add methods to allow customization of save dialog during will-download event (#15497)
* feat: add method to DownloadItem that allows customization of dialog options * docs: add docs for get/setSaveDialogOptions * add missing copy constructor for DialogSettings on mac and linux * fix: don't filter dialog options for mas build, don't return properties * test: add test for get/setSaveDialogOptions * fix: remove openDevtools added for debugging * test: fix failing test because of new event parameter * docs: use SaveDialogOptions instead of Object
This commit is contained in:
parent
673004b878
commit
ca2d74e118
13 changed files with 203 additions and 49 deletions
|
@ -7,6 +7,7 @@
|
|||
|
||||
#include <string>
|
||||
|
||||
#include "atom/browser/ui/file_dialog.h"
|
||||
#include "base/memory/weak_ptr.h"
|
||||
#include "content/public/browser/download_manager_delegate.h"
|
||||
|
||||
|
@ -41,6 +42,8 @@ class AtomDownloadManagerDelegate : public content::DownloadManagerDelegate {
|
|||
private:
|
||||
// Get the save path set on the associated api::DownloadItem object
|
||||
void GetItemSavePath(download::DownloadItem* item, base::FilePath* path);
|
||||
void GetItemSaveDialogOptions(download::DownloadItem* item,
|
||||
file_dialog::DialogSettings* settings);
|
||||
|
||||
content::DownloadManager* download_manager_;
|
||||
base::WeakPtrFactory<AtomDownloadManagerDelegate> weak_ptr_factory_;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue