| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 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 | 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 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
| 10 #include "base/memory/weak_ptr.h" | 10 #include "base/memory/weak_ptr.h" |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 bool can_save_as_complete, | 22 bool can_save_as_complete, |
| 23 DownloadPrefs* download_prefs); | 23 DownloadPrefs* download_prefs); |
| 24 virtual ~SavePackageFilePicker(); | 24 virtual ~SavePackageFilePicker(); |
| 25 | 25 |
| 26 // Used to disable prompting the user for a directory/filename of the saved | 26 // Used to disable prompting the user for a directory/filename of the saved |
| 27 // web page. This is available for testing. | 27 // web page. This is available for testing. |
| 28 static void SetShouldPromptUser(bool should_prompt); | 28 static void SetShouldPromptUser(bool should_prompt); |
| 29 | 29 |
| 30 private: | 30 private: |
| 31 // SelectFileDialog::Listener implementation. | 31 // SelectFileDialog::Listener implementation. |
| 32 virtual void FileSelected(const FilePath& path, int index, void* params); | 32 virtual void FileSelected(const FilePath& path, |
| 33 virtual void FileSelectionCanceled(void* params); | 33 int index, |
| 34 void* params) OVERRIDE; |
| 35 virtual void FileSelectionCanceled(void* params) OVERRIDE; |
| 34 | 36 |
| 35 base::WeakPtr<SavePackage> save_package_; | 37 base::WeakPtr<SavePackage> save_package_; |
| 36 | 38 |
| 37 // For managing select file dialogs. | 39 // For managing select file dialogs. |
| 38 scoped_refptr<SelectFileDialog> select_file_dialog_; | 40 scoped_refptr<SelectFileDialog> select_file_dialog_; |
| 39 | 41 |
| 40 DISALLOW_COPY_AND_ASSIGN(SavePackageFilePicker); | 42 DISALLOW_COPY_AND_ASSIGN(SavePackageFilePicker); |
| 41 }; | 43 }; |
| 42 | 44 |
| 43 #endif // CHROME_BROWSER_DOWNLOAD_SAVE_PACKAGE_FILE_PICKER_H_ | 45 #endif // CHROME_BROWSER_DOWNLOAD_SAVE_PACKAGE_FILE_PICKER_H_ |
| OLD | NEW |