| 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 | 7 |
| 8 #include <queue> | 8 #include <queue> |
| 9 #include <set> | 9 #include <set> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 173 // Create a file name based on the response from the server. | 173 // Create a file name based on the response from the server. |
| 174 bool GenerateFileName(const std::string& disposition, | 174 bool GenerateFileName(const std::string& disposition, |
| 175 const GURL& url, | 175 const GURL& url, |
| 176 bool need_html_ext, | 176 bool need_html_ext, |
| 177 base::FilePath::StringType* generated_name); | 177 base::FilePath::StringType* generated_name); |
| 178 | 178 |
| 179 // Set of methods to get all savable resource links from current web page, | 179 // Set of methods to get all savable resource links from current web page, |
| 180 // including main frame and sub-frames. | 180 // including main frame and sub-frames. |
| 181 void GetSavableResourceLinks(); | 181 void GetSavableResourceLinks(); |
| 182 void GetSavableResourceLinksForFrame(RenderFrameHost* target); | 182 void GetSavableResourceLinksForFrame(RenderFrameHost* target); |
| 183 void OnSavableResourceLinksResponse( | 183 void OnSavableResourceLinksResponse(RenderFrameHost* sender, |
| 184 RenderFrameHost* sender, | 184 const GURL& frame_url, |
| 185 const GURL& frame_url, | 185 const std::vector<GURL>& resources_list, |
| 186 const std::vector<GURL>& resources_list, | 186 const Referrer& referrer); |
| 187 const std::vector<Referrer>& referrers_list); | |
| 188 void OnSavableResourceLinksError(RenderFrameHost* sender); | 187 void OnSavableResourceLinksError(RenderFrameHost* sender); |
| 189 void CompleteSavableResourceLinksResponse(); | 188 void CompleteSavableResourceLinksResponse(); |
| 190 | 189 |
| 191 // For each frame in the current page, ask the renderer process associated | 190 // For each frame in the current page, ask the renderer process associated |
| 192 // with that frame to serialize that frame into html. | 191 // with that frame to serialize that frame into html. |
| 193 void GetSerializedHtmlWithLocalLinks(); | 192 void GetSerializedHtmlWithLocalLinks(); |
| 194 | 193 |
| 195 // Ask renderer process to serialize |target| frame into html data | 194 // Ask renderer process to serialize |target| frame into html data |
| 196 // with lists which contain all resource links that have a local copy. | 195 // with lists which contain all resource links that have a local copy. |
| 197 // - The parameter |saved_links| contains original URLs of all saved links | 196 // - The parameter |saved_links| contains original URLs of all saved links |
| (...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 366 friend class SavePackageTest; | 365 friend class SavePackageTest; |
| 367 FRIEND_TEST_ALL_PREFIXES(SavePackageTest, TestSuggestedSaveNames); | 366 FRIEND_TEST_ALL_PREFIXES(SavePackageTest, TestSuggestedSaveNames); |
| 368 FRIEND_TEST_ALL_PREFIXES(SavePackageTest, TestLongSafePureFilename); | 367 FRIEND_TEST_ALL_PREFIXES(SavePackageTest, TestLongSafePureFilename); |
| 369 | 368 |
| 370 DISALLOW_COPY_AND_ASSIGN(SavePackage); | 369 DISALLOW_COPY_AND_ASSIGN(SavePackage); |
| 371 }; | 370 }; |
| 372 | 371 |
| 373 } // namespace content | 372 } // namespace content |
| 374 | 373 |
| 375 #endif // CONTENT_BROWSER_DOWNLOAD_SAVE_PACKAGE_H_ | 374 #endif // CONTENT_BROWSER_DOWNLOAD_SAVE_PACKAGE_H_ |
| OLD | NEW |