OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROME_BROWSER_DOWNLOAD_DOWNLOAD_FILE_PICKER_H_ | 5 #ifndef CHROME_BROWSER_DOWNLOAD_DOWNLOAD_FILE_PICKER_H_ |
6 #define CHROME_BROWSER_DOWNLOAD_DOWNLOAD_FILE_PICKER_H_ | 6 #define CHROME_BROWSER_DOWNLOAD_DOWNLOAD_FILE_PICKER_H_ |
7 | 7 |
8 #include "chrome/browser/download/chrome_download_manager_delegate.h" | 8 #include "chrome/browser/download/chrome_download_manager_delegate.h" |
9 #include "chrome/browser/ui/select_file_dialog.h" | 9 #include "ui/base/dialogs/select_file_dialog.h" |
10 | 10 |
11 class FilePath; | 11 class FilePath; |
12 | 12 |
13 namespace content { | 13 namespace content { |
14 class DownloadItem; | 14 class DownloadItem; |
15 class DownloadManager; | 15 class DownloadManager; |
16 class WebContents; | 16 class WebContents; |
17 } | 17 } |
18 | 18 |
19 // Handles showing a dialog to the user to ask for the filename for a download. | 19 // Handles showing a dialog to the user to ask for the filename for a download. |
20 class DownloadFilePicker : public SelectFileDialog::Listener { | 20 class DownloadFilePicker : public ui::SelectFileDialog::Listener { |
21 public: | 21 public: |
22 DownloadFilePicker(); | 22 DownloadFilePicker(); |
23 virtual ~DownloadFilePicker(); | 23 virtual ~DownloadFilePicker(); |
24 | 24 |
25 void Init(content::DownloadManager* download_manager, | 25 void Init(content::DownloadManager* download_manager, |
26 content::DownloadItem* item, | 26 content::DownloadItem* item, |
27 const FilePath& suggested_path, | 27 const FilePath& suggested_path, |
28 const ChromeDownloadManagerDelegate::FileSelectedCallback& | 28 const ChromeDownloadManagerDelegate::FileSelectedCallback& |
29 callback); | 29 callback); |
30 | 30 |
(...skipping 21 matching lines...) Expand all Loading... |
52 virtual void FileSelected(const FilePath& path, | 52 virtual void FileSelected(const FilePath& path, |
53 int index, | 53 int index, |
54 void* params) OVERRIDE; | 54 void* params) OVERRIDE; |
55 virtual void FileSelectionCanceled(void* params) OVERRIDE; | 55 virtual void FileSelectionCanceled(void* params) OVERRIDE; |
56 | 56 |
57 FilePath suggested_path_; | 57 FilePath suggested_path_; |
58 | 58 |
59 ChromeDownloadManagerDelegate::FileSelectedCallback file_selected_callback_; | 59 ChromeDownloadManagerDelegate::FileSelectedCallback file_selected_callback_; |
60 | 60 |
61 // For managing select file dialogs. | 61 // For managing select file dialogs. |
62 scoped_refptr<SelectFileDialog> select_file_dialog_; | 62 scoped_refptr<ui::SelectFileDialog> select_file_dialog_; |
63 | 63 |
64 DISALLOW_COPY_AND_ASSIGN(DownloadFilePicker); | 64 DISALLOW_COPY_AND_ASSIGN(DownloadFilePicker); |
65 }; | 65 }; |
66 | 66 |
67 #endif // CHROME_BROWSER_DOWNLOAD_DOWNLOAD_FILE_PICKER_H_ | 67 #endif // CHROME_BROWSER_DOWNLOAD_DOWNLOAD_FILE_PICKER_H_ |
OLD | NEW |