| 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 <deque> | 8 #include <deque> |
| 9 #include <map> | 9 #include <map> |
| 10 #include <set> | 10 #include <set> |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 #include "net/base/net_errors.h" | 28 #include "net/base/net_errors.h" |
| 29 #include "url/gurl.h" | 29 #include "url/gurl.h" |
| 30 | 30 |
| 31 class GURL; | 31 class GURL; |
| 32 | 32 |
| 33 namespace content { | 33 namespace content { |
| 34 class DownloadItemImpl; | 34 class DownloadItemImpl; |
| 35 class DownloadManagerImpl; | 35 class DownloadManagerImpl; |
| 36 class FrameTreeNode; | 36 class FrameTreeNode; |
| 37 class RenderFrameHostImpl; | 37 class RenderFrameHostImpl; |
| 38 struct SavableSubframe; |
| 38 class SaveFileManager; | 39 class SaveFileManager; |
| 39 class SaveItem; | 40 class SaveItem; |
| 40 class SavePackage; | 41 class SavePackage; |
| 41 class WebContents; | 42 class WebContents; |
| 42 | 43 |
| 43 // The SavePackage object manages the process of saving a page as only-html or | 44 // The SavePackage object manages the process of saving a page as only-html or |
| 44 // complete-html or MHTML and providing the information for displaying saving | 45 // complete-html or MHTML and providing the information for displaying saving |
| 45 // status. Saving page as only-html means means that we save web page to a | 46 // status. Saving page as only-html means means that we save web page to a |
| 46 // single HTML file regardless internal sub resources and sub frames. Saving | 47 // single HTML file regardless internal sub resources and sub frames. Saving |
| 47 // page as complete-html page means we save not only the main html file the user | 48 // page as complete-html page means we save not only the main html file the user |
| (...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 193 void GetSavableResourceLinks(); | 194 void GetSavableResourceLinks(); |
| 194 | 195 |
| 195 // Asks a given frame for its savable resources. | 196 // Asks a given frame for its savable resources. |
| 196 void GetSavableResourceLinksForFrame(RenderFrameHost* target); | 197 void GetSavableResourceLinksForFrame(RenderFrameHost* target); |
| 197 | 198 |
| 198 // Response from |sender| frame to GetSavableResourceLinksForFrame request. | 199 // Response from |sender| frame to GetSavableResourceLinksForFrame request. |
| 199 void OnSavableResourceLinksResponse( | 200 void OnSavableResourceLinksResponse( |
| 200 RenderFrameHostImpl* sender, | 201 RenderFrameHostImpl* sender, |
| 201 const std::vector<GURL>& resources_list, | 202 const std::vector<GURL>& resources_list, |
| 202 const Referrer& referrer, | 203 const Referrer& referrer, |
| 203 const std::vector<GURL>& subframe_original_urls, | 204 const std::vector<SavableSubframe>& subframes); |
| 204 const std::vector<int>& subframe_routing_ids); | |
| 205 | 205 |
| 206 // Helper for finding or creating a SaveItem with the given parameters. | 206 // Helper for finding or creating a SaveItem with the given parameters. |
| 207 SaveItem* FindOrCreatePendingSaveItem( | 207 SaveItem* FindOrCreatePendingSaveItem( |
| 208 int container_frame_tree_node_id, | 208 int container_frame_tree_node_id, |
| 209 const GURL& url, | 209 const GURL& url, |
| 210 const Referrer& referrer, | 210 const Referrer& referrer, |
| 211 SaveFileCreateInfo::SaveFileSource save_source); | 211 SaveFileCreateInfo::SaveFileSource save_source); |
| 212 | 212 |
| 213 // Helper to enqueue a savable resource reported by | 213 // Helper to enqueue a savable resource reported by |
| 214 // GetSavableResourceLinksForFrame. | 214 // GetSavableResourceLinksForFrame. |
| (...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 408 friend class SavePackageTest; | 408 friend class SavePackageTest; |
| 409 FRIEND_TEST_ALL_PREFIXES(SavePackageTest, TestSuggestedSaveNames); | 409 FRIEND_TEST_ALL_PREFIXES(SavePackageTest, TestSuggestedSaveNames); |
| 410 FRIEND_TEST_ALL_PREFIXES(SavePackageTest, TestLongSafePureFilename); | 410 FRIEND_TEST_ALL_PREFIXES(SavePackageTest, TestLongSafePureFilename); |
| 411 | 411 |
| 412 DISALLOW_COPY_AND_ASSIGN(SavePackage); | 412 DISALLOW_COPY_AND_ASSIGN(SavePackage); |
| 413 }; | 413 }; |
| 414 | 414 |
| 415 } // namespace content | 415 } // namespace content |
| 416 | 416 |
| 417 #endif // CONTENT_BROWSER_DOWNLOAD_SAVE_PACKAGE_H_ | 417 #endif // CONTENT_BROWSER_DOWNLOAD_SAVE_PACKAGE_H_ |
| OLD | NEW |