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 384 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
395 // Returns true if the download has been auto-opened by the system. | 395 // Returns true if the download has been auto-opened by the system. |
396 virtual bool GetAutoOpened() = 0; | 396 virtual bool GetAutoOpened() = 0; |
397 | 397 |
398 // Returns true if the download has been opened. | 398 // Returns true if the download has been opened. |
399 virtual bool GetOpened() const = 0; | 399 virtual bool GetOpened() const = 0; |
400 | 400 |
401 // Time the download was last accessed. Returns NULL if the download has never | 401 // Time the download was last accessed. Returns NULL if the download has never |
402 // been opened. | 402 // been opened. |
403 virtual base::Time GetLastAccessTime() const = 0; | 403 virtual base::Time GetLastAccessTime() const = 0; |
404 | 404 |
| 405 // Returns whether the download item is transient. Transient items are cleaned |
| 406 // up after completion and not shown in the UI. |
| 407 virtual bool IsTransient() const = 0; |
| 408 |
405 // Misc State accessors --------------------------------------------------- | 409 // Misc State accessors --------------------------------------------------- |
406 | 410 |
407 // BrowserContext that indirectly owns this download. Always valid. | 411 // BrowserContext that indirectly owns this download. Always valid. |
408 virtual BrowserContext* GetBrowserContext() const = 0; | 412 virtual BrowserContext* GetBrowserContext() const = 0; |
409 | 413 |
410 // WebContents associated with the download. Returns nullptr if the | 414 // WebContents associated with the download. Returns nullptr if the |
411 // WebContents is unknown or if the download was not performed on behalf of a | 415 // WebContents is unknown or if the download was not performed on behalf of a |
412 // renderer. | 416 // renderer. |
413 virtual WebContents* GetWebContents() const = 0; | 417 virtual WebContents* GetWebContents() const = 0; |
414 | 418 |
(...skipping 21 matching lines...) Expand all Loading... |
436 // return |name|. Has no effect on the final target filename. | 440 // return |name|. Has no effect on the final target filename. |
437 virtual void SetDisplayName(const base::FilePath& name) = 0; | 441 virtual void SetDisplayName(const base::FilePath& name) = 0; |
438 | 442 |
439 // Debug/testing ------------------------------------------------------------- | 443 // Debug/testing ------------------------------------------------------------- |
440 virtual std::string DebugString(bool verbose) const = 0; | 444 virtual std::string DebugString(bool verbose) const = 0; |
441 }; | 445 }; |
442 | 446 |
443 } // namespace content | 447 } // namespace content |
444 | 448 |
445 #endif // CONTENT_PUBLIC_BROWSER_DOWNLOAD_ITEM_H_ | 449 #endif // CONTENT_PUBLIC_BROWSER_DOWNLOAD_ITEM_H_ |
OLD | NEW |