| Index: chrome/browser/download/download_file_picker.h
|
| diff --git a/chrome/browser/download/download_file_picker.h b/chrome/browser/download/download_file_picker.h
|
| index 011eaeaafe7cd943ca65261aadc7583dfa34bf2d..a7ea2a01e3a0939709f03d451d06d63687366b02 100644
|
| --- a/chrome/browser/download/download_file_picker.h
|
| +++ b/chrome/browser/download/download_file_picker.h
|
| @@ -5,6 +5,7 @@
|
| #ifndef CHROME_BROWSER_DOWNLOAD_DOWNLOAD_FILE_PICKER_H_
|
| #define CHROME_BROWSER_DOWNLOAD_DOWNLOAD_FILE_PICKER_H_
|
|
|
| +#include "chrome/browser/download/chrome_download_manager_delegate.h"
|
| #include "chrome/browser/ui/select_file_dialog.h"
|
|
|
| class FilePath;
|
| @@ -22,15 +23,25 @@ class DownloadFilePicker : public SelectFileDialog::Listener {
|
| virtual ~DownloadFilePicker();
|
|
|
| void Init(content::DownloadManager* download_manager,
|
| - content::DownloadItem* item);
|
| + content::DownloadItem* item,
|
| + const FilePath& suggested_path,
|
| + const ChromeDownloadManagerDelegate::FileSelectedCallback&
|
| + callback);
|
|
|
| protected:
|
| - // On ChromeOS, DownloadItem::GetTargetPath is a temporary local filename.
|
| - virtual void InitSuggestedPath(content::DownloadItem* item);
|
| + // On ChromeOS |suggested_path| might be a temporary local filename. This
|
| + // method should be overridden to set the correct suggested path to prompt the
|
| + // user.
|
| + virtual void InitSuggestedPath(content::DownloadItem* item,
|
| + const FilePath& suggested_path);
|
| +
|
| void set_suggested_path(const FilePath& suggested_path) {
|
| suggested_path_ = suggested_path;
|
| }
|
|
|
| + // Runs |file_selected_callback_| with |path| and then deletes this object.
|
| + void OnFileSelected(const FilePath& path);
|
| +
|
| void RecordFileSelected(const FilePath& path);
|
|
|
| scoped_refptr<content::DownloadManager> download_manager_;
|
| @@ -45,6 +56,8 @@ class DownloadFilePicker : public SelectFileDialog::Listener {
|
|
|
| FilePath suggested_path_;
|
|
|
| + ChromeDownloadManagerDelegate::FileSelectedCallback file_selected_callback_;
|
| +
|
| // For managing select file dialogs.
|
| scoped_refptr<SelectFileDialog> select_file_dialog_;
|
|
|
|
|