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 // The DownloadItemFactory is used to produce different DownloadItems. | 5 // The DownloadItemFactory is used to produce different DownloadItems. |
6 // It is separate from the DownloadManager to allow download manager | 6 // It is separate from the DownloadManager to allow download manager |
7 // unit tests to control the items produced. | 7 // unit tests to control the items produced. |
8 | 8 |
9 #ifndef CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_ITEM_FACTORY_H_ | 9 #ifndef CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_ITEM_FACTORY_H_ |
10 #define CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_ITEM_FACTORY_H_ | 10 #define CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_ITEM_FACTORY_H_ |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
57 const std::string& etag, | 57 const std::string& etag, |
58 const std::string& last_modified, | 58 const std::string& last_modified, |
59 int64_t received_bytes, | 59 int64_t received_bytes, |
60 int64_t total_bytes, | 60 int64_t total_bytes, |
61 const std::string& hash, | 61 const std::string& hash, |
62 DownloadItem::DownloadState state, | 62 DownloadItem::DownloadState state, |
63 DownloadDangerType danger_type, | 63 DownloadDangerType danger_type, |
64 DownloadInterruptReason interrupt_reason, | 64 DownloadInterruptReason interrupt_reason, |
65 bool opened, | 65 bool opened, |
66 base::Time last_access_time, | 66 base::Time last_access_time, |
| 67 bool visible, |
67 const std::vector<DownloadItem::ReceivedSlice>& received_slices, | 68 const std::vector<DownloadItem::ReceivedSlice>& received_slices, |
68 const net::NetLogWithSource& net_log) = 0; | 69 const net::NetLogWithSource& net_log) = 0; |
69 | 70 |
70 virtual DownloadItemImpl* CreateActiveItem( | 71 virtual DownloadItemImpl* CreateActiveItem( |
71 DownloadItemImplDelegate* delegate, | 72 DownloadItemImplDelegate* delegate, |
72 uint32_t download_id, | 73 uint32_t download_id, |
73 const DownloadCreateInfo& info, | 74 const DownloadCreateInfo& info, |
74 const net::NetLogWithSource& net_log) = 0; | 75 const net::NetLogWithSource& net_log) = 0; |
75 | 76 |
76 virtual DownloadItemImpl* CreateSavePageItem( | 77 virtual DownloadItemImpl* CreateSavePageItem( |
77 DownloadItemImplDelegate* delegate, | 78 DownloadItemImplDelegate* delegate, |
78 uint32_t download_id, | 79 uint32_t download_id, |
79 const base::FilePath& path, | 80 const base::FilePath& path, |
80 const GURL& url, | 81 const GURL& url, |
81 const std::string& mime_type, | 82 const std::string& mime_type, |
82 std::unique_ptr<DownloadRequestHandleInterface> request_handle, | 83 std::unique_ptr<DownloadRequestHandleInterface> request_handle, |
83 const net::NetLogWithSource& net_log) = 0; | 84 const net::NetLogWithSource& net_log) = 0; |
84 }; | 85 }; |
85 | 86 |
86 } // namespace content | 87 } // namespace content |
87 | 88 |
88 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_ITEM_FACTORY_H_ | 89 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_ITEM_FACTORY_H_ |
OLD | NEW |