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_SAVE_PACKAGE_FILE_PICKER_H_ | 5 #ifndef CHROME_BROWSER_DOWNLOAD_SAVE_PACKAGE_FILE_PICKER_H_ |
6 #define CHROME_BROWSER_DOWNLOAD_SAVE_PACKAGE_FILE_PICKER_H_ | 6 #define CHROME_BROWSER_DOWNLOAD_SAVE_PACKAGE_FILE_PICKER_H_ |
7 | 7 |
| 8 #include <vector> |
| 9 |
8 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
9 #include "content/public/browser/download_manager_delegate.h" | 11 #include "content/public/browser/download_manager_delegate.h" |
| 12 #include "content/public/browser/save_page_type.h" |
10 #include "ui/shell_dialogs/select_file_dialog.h" | 13 #include "ui/shell_dialogs/select_file_dialog.h" |
11 | 14 |
12 class DownloadPrefs; | 15 class DownloadPrefs; |
13 | 16 |
14 // Handles showing a dialog to the user to ask for the filename to save a page. | 17 // Handles showing a dialog to the user to ask for the filename to save a page. |
15 class SavePackageFilePicker : public ui::SelectFileDialog::Listener { | 18 class SavePackageFilePicker : public ui::SelectFileDialog::Listener { |
16 public: | 19 public: |
17 SavePackageFilePicker( | 20 SavePackageFilePicker( |
18 content::WebContents* web_contents, | 21 content::WebContents* web_contents, |
19 const base::FilePath& suggested_path, | 22 const base::FilePath& suggested_path, |
(...skipping 19 matching lines...) Expand all Loading... |
39 // Used to look up the renderer process for this request to get the context. | 42 // Used to look up the renderer process for this request to get the context. |
40 int render_process_id_; | 43 int render_process_id_; |
41 | 44 |
42 // Whether the web page can be saved as a complete HTML file. | 45 // Whether the web page can be saved as a complete HTML file. |
43 bool can_save_as_complete_; | 46 bool can_save_as_complete_; |
44 | 47 |
45 DownloadPrefs* download_prefs_; | 48 DownloadPrefs* download_prefs_; |
46 | 49 |
47 content::SavePackagePathPickedCallback callback_; | 50 content::SavePackagePathPickedCallback callback_; |
48 | 51 |
| 52 std::vector<content::SavePageType> save_types_; |
| 53 |
49 // For managing select file dialogs. | 54 // For managing select file dialogs. |
50 scoped_refptr<ui::SelectFileDialog> select_file_dialog_; | 55 scoped_refptr<ui::SelectFileDialog> select_file_dialog_; |
51 | 56 |
52 DISALLOW_COPY_AND_ASSIGN(SavePackageFilePicker); | 57 DISALLOW_COPY_AND_ASSIGN(SavePackageFilePicker); |
53 }; | 58 }; |
54 | 59 |
55 #endif // CHROME_BROWSER_DOWNLOAD_SAVE_PACKAGE_FILE_PICKER_H_ | 60 #endif // CHROME_BROWSER_DOWNLOAD_SAVE_PACKAGE_FILE_PICKER_H_ |
OLD | NEW |