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 // The DownloadManager object manages the process of downloading, including | 5 // The DownloadManager object manages the process of downloading, including |
6 // updates to the history system and providing the information for displaying | 6 // updates to the history system and providing the information for displaying |
7 // the downloads view in the Destinations tab. There is one DownloadManager per | 7 // the downloads view in the Destinations tab. There is one DownloadManager per |
8 // active browser context in Chrome. | 8 // active browser context in Chrome. |
9 // | 9 // |
10 // Download observers: | 10 // Download observers: |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 class BrowserContext; | 49 class BrowserContext; |
50 class ByteStreamReader; | 50 class ByteStreamReader; |
51 class DownloadManagerDelegate; | 51 class DownloadManagerDelegate; |
52 class DownloadQuery; | 52 class DownloadQuery; |
53 class DownloadRequestHandle; | 53 class DownloadRequestHandle; |
54 struct DownloadCreateInfo; | 54 struct DownloadCreateInfo; |
55 | 55 |
56 // Browser's download manager: manages all downloads and destination view. | 56 // Browser's download manager: manages all downloads and destination view. |
57 class CONTENT_EXPORT DownloadManager : public base::SupportsUserData::Data { | 57 class CONTENT_EXPORT DownloadManager : public base::SupportsUserData::Data { |
58 public: | 58 public: |
59 virtual ~DownloadManager() {} | 59 ~DownloadManager() override {} |
60 | 60 |
61 // Sets/Gets the delegate for this DownloadManager. The delegate has to live | 61 // Sets/Gets the delegate for this DownloadManager. The delegate has to live |
62 // past its Shutdown method being called (by the DownloadManager). | 62 // past its Shutdown method being called (by the DownloadManager). |
63 virtual void SetDelegate(DownloadManagerDelegate* delegate) = 0; | 63 virtual void SetDelegate(DownloadManagerDelegate* delegate) = 0; |
64 virtual DownloadManagerDelegate* GetDelegate() const = 0; | 64 virtual DownloadManagerDelegate* GetDelegate() const = 0; |
65 | 65 |
66 // Shutdown the download manager. Content calls this when BrowserContext is | 66 // Shutdown the download manager. Content calls this when BrowserContext is |
67 // being destructed. If the embedder needs this to be called earlier, it can | 67 // being destructed. If the embedder needs this to be called earlier, it can |
68 // call it. In that case, the delegate's Shutdown() method will only be called | 68 // call it. In that case, the delegate's Shutdown() method will only be called |
69 // once. | 69 // once. |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
174 virtual void CheckForHistoryFilesRemoval() = 0; | 174 virtual void CheckForHistoryFilesRemoval() = 0; |
175 | 175 |
176 // Get the download item for |id| if present, no matter what type of download | 176 // Get the download item for |id| if present, no matter what type of download |
177 // it is or state it's in. | 177 // it is or state it's in. |
178 virtual DownloadItem* GetDownload(uint32 id) = 0; | 178 virtual DownloadItem* GetDownload(uint32 id) = 0; |
179 }; | 179 }; |
180 | 180 |
181 } // namespace content | 181 } // namespace content |
182 | 182 |
183 #endif // CONTENT_PUBLIC_BROWSER_DOWNLOAD_MANAGER_H_ | 183 #endif // CONTENT_PUBLIC_BROWSER_DOWNLOAD_MANAGER_H_ |
OLD | NEW |