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 282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
293 virtual bool GetOpenWhenComplete() const = 0; | 293 virtual bool GetOpenWhenComplete() const = 0; |
294 | 294 |
295 // Returns true if the download has been auto-opened by the system. | 295 // Returns true if the download has been auto-opened by the system. |
296 virtual bool GetAutoOpened() = 0; | 296 virtual bool GetAutoOpened() = 0; |
297 | 297 |
298 // Returns true if the download has been opened. | 298 // Returns true if the download has been opened. |
299 virtual bool GetOpened() const = 0; | 299 virtual bool GetOpened() const = 0; |
300 | 300 |
301 // Misc State accessors --------------------------------------------------- | 301 // Misc State accessors --------------------------------------------------- |
302 | 302 |
303 // Returns true if this item matches |query|. |query| must be lower-cased. | |
304 virtual bool MatchesQuery(const string16& query) const = 0; | |
305 | |
306 virtual DownloadPersistentStoreInfo GetPersistentStoreInfo() const = 0; | 303 virtual DownloadPersistentStoreInfo GetPersistentStoreInfo() const = 0; |
307 virtual BrowserContext* GetBrowserContext() const = 0; | 304 virtual BrowserContext* GetBrowserContext() const = 0; |
308 virtual WebContents* GetWebContents() const = 0; | 305 virtual WebContents* GetWebContents() const = 0; |
309 | 306 |
310 // External state transitions/setters ---------------------------------------- | 307 // External state transitions/setters ---------------------------------------- |
311 // TODO(rdsmith): These should all be removed; the download item should | 308 // TODO(rdsmith): These should all be removed; the download item should |
312 // control its own state transitions. | 309 // control its own state transitions. |
313 | 310 |
314 // Called by the delegate if it delayed opening the download after | 311 // Called by the delegate if it delayed opening the download after |
315 // the download has actually been opened. | 312 // the download has actually been opened. |
(...skipping 20 matching lines...) Expand all Loading... |
336 virtual void SetDisplayName(const FilePath& name) = 0; | 333 virtual void SetDisplayName(const FilePath& name) = 0; |
337 | 334 |
338 // Debug/testing ------------------------------------------------------------- | 335 // Debug/testing ------------------------------------------------------------- |
339 virtual std::string DebugString(bool verbose) const = 0; | 336 virtual std::string DebugString(bool verbose) const = 0; |
340 virtual void MockDownloadOpenForTesting() = 0; | 337 virtual void MockDownloadOpenForTesting() = 0; |
341 }; | 338 }; |
342 | 339 |
343 } // namespace content | 340 } // namespace content |
344 | 341 |
345 #endif // CONTENT_PUBLIC_BROWSER_DOWNLOAD_ITEM_H_ | 342 #endif // CONTENT_PUBLIC_BROWSER_DOWNLOAD_ITEM_H_ |
OLD | NEW |