| OLD | NEW |
| (Empty) | |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CHROME_BROWSER_DOWNLOAD_SAVE_PACKAGE_FILE_PICKER_H_ |
| 6 #define CHROME_BROWSER_DOWNLOAD_SAVE_PACKAGE_FILE_PICKER_H_ |
| 7 #pragma once |
| 8 |
| 9 #include "base/memory/ref_counted.h" |
| 10 #include "chrome/browser/ui/shell_dialogs.h" |
| 11 |
| 12 class FilePath; |
| 13 class SavePackage; |
| 14 |
| 15 // Handles showing a dialog to the user to ask for the filename to save a page. |
| 16 class SavePackageFilePicker : public SelectFileDialog::Listener { |
| 17 public: |
| 18 SavePackageFilePicker(SavePackage* save_package, |
| 19 const FilePath& suggested_path, |
| 20 bool can_save_as_complete); |
| 21 ~SavePackageFilePicker(); |
| 22 |
| 23 // Used to disable prompting the user for a directory/filename of the saved |
| 24 // web page. This is available for testing. |
| 25 static void SetShouldPromptUser(bool should_prompt); |
| 26 |
| 27 private: |
| 28 // SelectFileDialog::Listener implementation. |
| 29 virtual void FileSelected(const FilePath& path, int index, void* params); |
| 30 virtual void FileSelectionCanceled(void* params); |
| 31 |
| 32 scoped_refptr<SavePackage> save_package_; |
| 33 |
| 34 // For managing select file dialogs. |
| 35 scoped_refptr<SelectFileDialog> select_file_dialog_; |
| 36 |
| 37 DISALLOW_COPY_AND_ASSIGN(SavePackageFilePicker); |
| 38 }; |
| 39 |
| 40 #endif // CHROME_BROWSER_DOWNLOAD_SAVE_PACKAGE_FILE_PICKER_H_ |
| OLD | NEW |