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 300 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
311 // Mark the download as having been opened (without actually opening it). | 311 // Mark the download as having been opened (without actually opening it). |
312 virtual void SetOpened(bool opened) = 0; | 312 virtual void SetOpened(bool opened) = 0; |
313 | 313 |
314 // Set a display name for the download that will be independent of the target | 314 // Set a display name for the download that will be independent of the target |
315 // filename. If |name| is not empty, then GetFileNameToReportUser() will | 315 // filename. If |name| is not empty, then GetFileNameToReportUser() will |
316 // return |name|. Has no effect on the final target filename. | 316 // return |name|. Has no effect on the final target filename. |
317 virtual void SetDisplayName(const FilePath& name) = 0; | 317 virtual void SetDisplayName(const FilePath& name) = 0; |
318 | 318 |
319 // Debug/testing ------------------------------------------------------------- | 319 // Debug/testing ------------------------------------------------------------- |
320 virtual std::string DebugString(bool verbose) const = 0; | 320 virtual std::string DebugString(bool verbose) const = 0; |
321 virtual void MockDownloadOpenForTesting() = 0; | |
322 }; | 321 }; |
323 | 322 |
324 } // namespace content | 323 } // namespace content |
325 | 324 |
326 #endif // CONTENT_PUBLIC_BROWSER_DOWNLOAD_ITEM_H_ | 325 #endif // CONTENT_PUBLIC_BROWSER_DOWNLOAD_ITEM_H_ |
OLD | NEW |