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 285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
296 | 296 |
297 // Returns true if the download has been opened. | 297 // Returns true if the download has been opened. |
298 virtual bool GetOpened() const = 0; | 298 virtual bool GetOpened() const = 0; |
299 | 299 |
300 // Misc State accessors --------------------------------------------------- | 300 // Misc State accessors --------------------------------------------------- |
301 | 301 |
302 virtual DownloadPersistentStoreInfo GetPersistentStoreInfo() const = 0; | 302 virtual DownloadPersistentStoreInfo GetPersistentStoreInfo() const = 0; |
303 virtual BrowserContext* GetBrowserContext() const = 0; | 303 virtual BrowserContext* GetBrowserContext() const = 0; |
304 virtual WebContents* GetWebContents() const = 0; | 304 virtual WebContents* GetWebContents() const = 0; |
305 | 305 |
| 306 // Controls whether the download should be shown in the download UI. |
| 307 virtual void SetShouldShowInDownloadsUI(bool should_show) = 0; |
| 308 virtual bool ShouldShowInDownloadsUI() const = 0; |
| 309 |
306 // External state transitions/setters ---------------------------------------- | 310 // External state transitions/setters ---------------------------------------- |
307 // TODO(rdsmith): These should all be removed; the download item should | 311 // TODO(rdsmith): These should all be removed; the download item should |
308 // control its own state transitions. | 312 // control its own state transitions. |
309 | 313 |
310 // Called by the delegate if it delayed opening the download after | 314 // Called by the delegate if it delayed opening the download after |
311 // the download has actually been opened. | 315 // the download has actually been opened. |
312 virtual void DelayedDownloadOpened(bool auto_opened) = 0; | 316 virtual void DelayedDownloadOpened(bool auto_opened) = 0; |
313 | 317 |
314 // Called if a check of the download contents was performed and the results of | 318 // Called if a check of the download contents was performed and the results of |
315 // the test are available. This should only be called after AllDataSaved() is | 319 // the test are available. This should only be called after AllDataSaved() is |
(...skipping 16 matching lines...) Expand all Loading... |
332 virtual void SetDisplayName(const FilePath& name) = 0; | 336 virtual void SetDisplayName(const FilePath& name) = 0; |
333 | 337 |
334 // Debug/testing ------------------------------------------------------------- | 338 // Debug/testing ------------------------------------------------------------- |
335 virtual std::string DebugString(bool verbose) const = 0; | 339 virtual std::string DebugString(bool verbose) const = 0; |
336 virtual void MockDownloadOpenForTesting() = 0; | 340 virtual void MockDownloadOpenForTesting() = 0; |
337 }; | 341 }; |
338 | 342 |
339 } // namespace content | 343 } // namespace content |
340 | 344 |
341 #endif // CONTENT_PUBLIC_BROWSER_DOWNLOAD_ITEM_H_ | 345 #endif // CONTENT_PUBLIC_BROWSER_DOWNLOAD_ITEM_H_ |
OLD | NEW |