| 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 16 matching lines...) Expand all  Loading... | 
| 27 #include "content/public/common/referrer.h" | 27 #include "content/public/common/referrer.h" | 
| 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 RenderFrameHostImpl; | 36 class RenderFrameHostImpl; | 
|  | 37 struct SavableSubframe; | 
| 37 class SaveFileManager; | 38 class SaveFileManager; | 
| 38 class SaveItem; | 39 class SaveItem; | 
| 39 class SavePackage; | 40 class SavePackage; | 
| 40 class WebContents; | 41 class WebContents; | 
| 41 | 42 | 
| 42 // The SavePackage object manages the process of saving a page as only-html or | 43 // The SavePackage object manages the process of saving a page as only-html or | 
| 43 // complete-html or MHTML and providing the information for displaying saving | 44 // complete-html or MHTML and providing the information for displaying saving | 
| 44 // status.  Saving page as only-html means means that we save web page to a | 45 // status.  Saving page as only-html means means that we save web page to a | 
| 45 // single HTML file regardless internal sub resources and sub frames.  Saving | 46 // single HTML file regardless internal sub resources and sub frames.  Saving | 
| 46 // page as complete-html page means we save not only the main html file the user | 47 // page as complete-html page means we save not only the main html file the user | 
| (...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 179                         base::FilePath::StringType* generated_name); | 180                         base::FilePath::StringType* generated_name); | 
| 180 | 181 | 
| 181   // Set of methods to get all savable resource links from current web page, | 182   // Set of methods to get all savable resource links from current web page, | 
| 182   // including main frame and sub-frames. | 183   // including main frame and sub-frames. | 
| 183   void GetSavableResourceLinks(); | 184   void GetSavableResourceLinks(); | 
| 184   void GetSavableResourceLinksForFrame(RenderFrameHost* target); | 185   void GetSavableResourceLinksForFrame(RenderFrameHost* target); | 
| 185   void OnSavableResourceLinksResponse( | 186   void OnSavableResourceLinksResponse( | 
| 186       RenderFrameHostImpl* sender, | 187       RenderFrameHostImpl* sender, | 
| 187       const std::vector<GURL>& resources_list, | 188       const std::vector<GURL>& resources_list, | 
| 188       const std::vector<Referrer>& referrers_list, | 189       const std::vector<Referrer>& referrers_list, | 
| 189       const std::vector<GURL>& subframe_original_urls, | 190       const std::vector<SavableSubframe>& subframes); | 
| 190       const std::vector<int>& subframe_routing_ids); |  | 
| 191   SaveItem* FindOrCreatePendingSaveItem( | 191   SaveItem* FindOrCreatePendingSaveItem( | 
| 192       int container_frame_tree_node_id, | 192       int container_frame_tree_node_id, | 
| 193       const GURL& url, | 193       const GURL& url, | 
| 194       const Referrer& referrer, | 194       const Referrer& referrer, | 
| 195       SaveFileCreateInfo::SaveFileSource save_source); | 195       SaveFileCreateInfo::SaveFileSource save_source); | 
| 196   void EnqueueSavableResource(int container_frame_tree_node_id, | 196   void EnqueueSavableResource(int container_frame_tree_node_id, | 
| 197                               const GURL& url, | 197                               const GURL& url, | 
| 198                               const Referrer& referrer); | 198                               const Referrer& referrer); | 
| 199   void EnqueueFrame(int container_frame_tree_node_id, | 199   void EnqueueFrame(int container_frame_tree_node_id, | 
| 200                     int frame_tree_node_id, | 200                     int frame_tree_node_id, | 
| (...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 385   friend class SavePackageTest; | 385   friend class SavePackageTest; | 
| 386   FRIEND_TEST_ALL_PREFIXES(SavePackageTest, TestSuggestedSaveNames); | 386   FRIEND_TEST_ALL_PREFIXES(SavePackageTest, TestSuggestedSaveNames); | 
| 387   FRIEND_TEST_ALL_PREFIXES(SavePackageTest, TestLongSafePureFilename); | 387   FRIEND_TEST_ALL_PREFIXES(SavePackageTest, TestLongSafePureFilename); | 
| 388 | 388 | 
| 389   DISALLOW_COPY_AND_ASSIGN(SavePackage); | 389   DISALLOW_COPY_AND_ASSIGN(SavePackage); | 
| 390 }; | 390 }; | 
| 391 | 391 | 
| 392 }  // namespace content | 392 }  // namespace content | 
| 393 | 393 | 
| 394 #endif  // CONTENT_BROWSER_DOWNLOAD_SAVE_PACKAGE_H_ | 394 #endif  // CONTENT_BROWSER_DOWNLOAD_SAVE_PACKAGE_H_ | 
| OLD | NEW | 
|---|