| 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 CONTENT_BROWSER_DOWNLOAD_SAVE_PACKAGE_H_ | 5 #ifndef CONTENT_BROWSER_DOWNLOAD_SAVE_PACKAGE_H_ |
| 6 #define CONTENT_BROWSER_DOWNLOAD_SAVE_PACKAGE_H_ | 6 #define CONTENT_BROWSER_DOWNLOAD_SAVE_PACKAGE_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <queue> | 9 #include <queue> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 117 | 117 |
| 118 // Called by the embedder once a path is chosen by the user. | 118 // Called by the embedder once a path is chosen by the user. |
| 119 void OnPathPicked(const FilePath& final_name, SavePackageType type); | 119 void OnPathPicked(const FilePath& final_name, SavePackageType type); |
| 120 | 120 |
| 121 bool canceled() const { return user_canceled_ || disk_error_occurred_; } | 121 bool canceled() const { return user_canceled_ || disk_error_occurred_; } |
| 122 bool finished() const { return finished_; } | 122 bool finished() const { return finished_; } |
| 123 SavePackageType save_type() const { return save_type_; } | 123 SavePackageType save_type() const { return save_type_; } |
| 124 int tab_id() const { return tab_id_; } | 124 int tab_id() const { return tab_id_; } |
| 125 int id() const { return unique_id_; } | 125 int id() const { return unique_id_; } |
| 126 TabContents* tab_contents() const; | 126 TabContents* tab_contents() const; |
| 127 content::WebContents* web_contents() const; |
| 127 | 128 |
| 128 void GetSaveInfo(); | 129 void GetSaveInfo(); |
| 129 | 130 |
| 130 // Statics ------------------------------------------------------------------- | 131 // Statics ------------------------------------------------------------------- |
| 131 | 132 |
| 132 // Check whether we can do the saving page operation for the specified URL. | 133 // Check whether we can do the saving page operation for the specified URL. |
| 133 static bool IsSavableURL(const GURL& url); | 134 static bool IsSavableURL(const GURL& url); |
| 134 | 135 |
| 135 // Check whether we can do the saving page operation for the contents which | 136 // Check whether we can do the saving page operation for the contents which |
| 136 // have the specified MIME type. | 137 // have the specified MIME type. |
| (...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 323 const int unique_id_; | 324 const int unique_id_; |
| 324 | 325 |
| 325 friend class SavePackageTest; | 326 friend class SavePackageTest; |
| 326 FRIEND_TEST_ALL_PREFIXES(SavePackageTest, TestSuggestedSaveNames); | 327 FRIEND_TEST_ALL_PREFIXES(SavePackageTest, TestSuggestedSaveNames); |
| 327 FRIEND_TEST_ALL_PREFIXES(SavePackageTest, TestLongSafePureFilename); | 328 FRIEND_TEST_ALL_PREFIXES(SavePackageTest, TestLongSafePureFilename); |
| 328 | 329 |
| 329 DISALLOW_COPY_AND_ASSIGN(SavePackage); | 330 DISALLOW_COPY_AND_ASSIGN(SavePackage); |
| 330 }; | 331 }; |
| 331 | 332 |
| 332 #endif // CONTENT_BROWSER_DOWNLOAD_SAVE_PACKAGE_H_ | 333 #endif // CONTENT_BROWSER_DOWNLOAD_SAVE_PACKAGE_H_ |
| OLD | NEW |