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