| 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 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 238 // URL of the top level frame at the time the download was initiated. | 238 // URL of the top level frame at the time the download was initiated. |
| 239 virtual const GURL& GetTabUrl() const = 0; | 239 virtual const GURL& GetTabUrl() const = 0; |
| 240 | 240 |
| 241 // Referrer URL for top level frame. | 241 // Referrer URL for top level frame. |
| 242 virtual const GURL& GetTabReferrerUrl() const = 0; | 242 virtual const GURL& GetTabReferrerUrl() const = 0; |
| 243 | 243 |
| 244 // For downloads initiated via <a download>, this is the suggested download | 244 // For downloads initiated via <a download>, this is the suggested download |
| 245 // filename from the download attribute. | 245 // filename from the download attribute. |
| 246 virtual std::string GetSuggestedFilename() const = 0; | 246 virtual std::string GetSuggestedFilename() const = 0; |
| 247 | 247 |
| 248 // Returns the HTTP response code. This is 0 when the response has not yet |
| 249 // been received or if the response code text could not be parsed. |
| 250 virtual int GetResponseCode() const = 0; |
| 251 |
| 248 // Content-Disposition header value from HTTP response. | 252 // Content-Disposition header value from HTTP response. |
| 249 virtual std::string GetContentDisposition() const = 0; | 253 virtual std::string GetContentDisposition() const = 0; |
| 250 | 254 |
| 251 // Effective MIME type of downloaded content. | 255 // Effective MIME type of downloaded content. |
| 252 virtual std::string GetMimeType() const = 0; | 256 virtual std::string GetMimeType() const = 0; |
| 253 | 257 |
| 254 // Content-Type header value from HTTP response. May be different from | 258 // Content-Type header value from HTTP response. May be different from |
| 255 // GetMimeType() if a different effective MIME type was chosen after MIME | 259 // GetMimeType() if a different effective MIME type was chosen after MIME |
| 256 // sniffing. | 260 // sniffing. |
| 257 virtual std::string GetOriginalMimeType() const = 0; | 261 virtual std::string GetOriginalMimeType() const = 0; |
| (...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 440 // return |name|. Has no effect on the final target filename. | 444 // return |name|. Has no effect on the final target filename. |
| 441 virtual void SetDisplayName(const base::FilePath& name) = 0; | 445 virtual void SetDisplayName(const base::FilePath& name) = 0; |
| 442 | 446 |
| 443 // Debug/testing ------------------------------------------------------------- | 447 // Debug/testing ------------------------------------------------------------- |
| 444 virtual std::string DebugString(bool verbose) const = 0; | 448 virtual std::string DebugString(bool verbose) const = 0; |
| 445 }; | 449 }; |
| 446 | 450 |
| 447 } // namespace content | 451 } // namespace content |
| 448 | 452 |
| 449 #endif // CONTENT_PUBLIC_BROWSER_DOWNLOAD_ITEM_H_ | 453 #endif // CONTENT_PUBLIC_BROWSER_DOWNLOAD_ITEM_H_ |
| OLD | NEW |