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 // Each download is represented by a DownloadItem, and all DownloadItems | 5 // Each download is represented by a DownloadItem, and all DownloadItems |
6 // are owned by the DownloadManager which maintains a global list of all | 6 // are owned by the DownloadManager which maintains a global list of all |
7 // downloads. DownloadItems are created when a user initiates a download, | 7 // downloads. DownloadItems are created when a user initiates a download, |
8 // and exist for the duration of the browser life time. | 8 // and exist for the duration of the browser life time. |
9 // | 9 // |
10 // Download observers: | 10 // Download observers: |
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
185 // completed downloads, cancelled downloads, and interrupted downloads that | 185 // completed downloads, cancelled downloads, and interrupted downloads that |
186 // can't be resumed. | 186 // can't be resumed. |
187 virtual bool IsDone() const = 0; | 187 virtual bool IsDone() const = 0; |
188 | 188 |
189 // Origin State accessors ------------------------------------------------- | 189 // Origin State accessors ------------------------------------------------- |
190 | 190 |
191 virtual const GURL& GetURL() const = 0; | 191 virtual const GURL& GetURL() const = 0; |
192 virtual const std::vector<GURL>& GetUrlChain() const = 0; | 192 virtual const std::vector<GURL>& GetUrlChain() const = 0; |
193 virtual const GURL& GetOriginalUrl() const = 0; | 193 virtual const GURL& GetOriginalUrl() const = 0; |
194 virtual const GURL& GetReferrerUrl() const = 0; | 194 virtual const GURL& GetReferrerUrl() const = 0; |
| 195 virtual const GURL& GetSiteInstanceUrl() const = 0; |
195 virtual const GURL& GetTabUrl() const = 0; | 196 virtual const GURL& GetTabUrl() const = 0; |
196 virtual const GURL& GetTabReferrerUrl() const = 0; | 197 virtual const GURL& GetTabReferrerUrl() const = 0; |
197 virtual std::string GetSuggestedFilename() const = 0; | 198 virtual std::string GetSuggestedFilename() const = 0; |
198 virtual std::string GetContentDisposition() const = 0; | 199 virtual std::string GetContentDisposition() const = 0; |
199 virtual std::string GetMimeType() const = 0; | 200 virtual std::string GetMimeType() const = 0; |
200 virtual std::string GetOriginalMimeType() const = 0; | 201 virtual std::string GetOriginalMimeType() const = 0; |
201 virtual std::string GetRemoteAddress() const = 0; | 202 virtual std::string GetRemoteAddress() const = 0; |
202 virtual bool HasUserGesture() const = 0; | 203 virtual bool HasUserGesture() const = 0; |
203 virtual ui::PageTransition GetTransitionType() const = 0; | 204 virtual ui::PageTransition GetTransitionType() const = 0; |
204 virtual const std::string& GetLastModifiedTime() const = 0; | 205 virtual const std::string& GetLastModifiedTime() const = 0; |
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
339 // return |name|. Has no effect on the final target filename. | 340 // return |name|. Has no effect on the final target filename. |
340 virtual void SetDisplayName(const base::FilePath& name) = 0; | 341 virtual void SetDisplayName(const base::FilePath& name) = 0; |
341 | 342 |
342 // Debug/testing ------------------------------------------------------------- | 343 // Debug/testing ------------------------------------------------------------- |
343 virtual std::string DebugString(bool verbose) const = 0; | 344 virtual std::string DebugString(bool verbose) const = 0; |
344 }; | 345 }; |
345 | 346 |
346 } // namespace content | 347 } // namespace content |
347 | 348 |
348 #endif // CONTENT_PUBLIC_BROWSER_DOWNLOAD_ITEM_H_ | 349 #endif // CONTENT_PUBLIC_BROWSER_DOWNLOAD_ITEM_H_ |
OLD | NEW |