| 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/callback.h" | 9 #include "base/callback.h" |
| 10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 virtual ~SavePackageFilePicker(); | 25 virtual ~SavePackageFilePicker(); |
| 26 | 26 |
| 27 // Used to disable prompting the user for a directory/filename of the saved | 27 // Used to disable prompting the user for a directory/filename of the saved |
| 28 // web page. This is available for testing. | 28 // web page. This is available for testing. |
| 29 static void SetShouldPromptUser(bool should_prompt); | 29 static void SetShouldPromptUser(bool should_prompt); |
| 30 | 30 |
| 31 private: | 31 private: |
| 32 // SelectFileDialog::Listener implementation. | 32 // SelectFileDialog::Listener implementation. |
| 33 virtual void FileSelected(const FilePath& path, | 33 virtual void FileSelected(const FilePath& path, |
| 34 int index, | 34 int index, |
| 35 void* params) OVERRIDE; | 35 void* unused_params) OVERRIDE; |
| 36 virtual void FileSelectionCanceled(void* params) OVERRIDE; | 36 virtual void FileSelectionCanceled(void* unused_params) OVERRIDE; |
| 37 |
| 38 bool ShouldSaveAsMHTML() const; |
| 37 | 39 |
| 38 // Used to look up the renderer process for this request to get the context. | 40 // Used to look up the renderer process for this request to get the context. |
| 39 int render_process_id_; | 41 int render_process_id_; |
| 40 | 42 |
| 43 // Whether the web page can be saved as a complete HTML file. |
| 44 bool can_save_as_complete_; |
| 45 |
| 41 content::SaveFilePathPickedCallback callback_; | 46 content::SaveFilePathPickedCallback callback_; |
| 42 | 47 |
| 43 // For managing select file dialogs. | 48 // For managing select file dialogs. |
| 44 scoped_refptr<SelectFileDialog> select_file_dialog_; | 49 scoped_refptr<SelectFileDialog> select_file_dialog_; |
| 45 | 50 |
| 46 DISALLOW_COPY_AND_ASSIGN(SavePackageFilePicker); | 51 DISALLOW_COPY_AND_ASSIGN(SavePackageFilePicker); |
| 47 }; | 52 }; |
| 48 | 53 |
| 49 #endif // CHROME_BROWSER_DOWNLOAD_SAVE_PACKAGE_FILE_PICKER_H_ | 54 #endif // CHROME_BROWSER_DOWNLOAD_SAVE_PACKAGE_FILE_PICKER_H_ |
| OLD | NEW |