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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 | 44 |
45 class DownloadFileManager; | 45 class DownloadFileManager; |
46 class DownloadManagerTest; | 46 class DownloadManagerTest; |
47 class DownloadRequestHandle; | 47 class DownloadRequestHandle; |
48 class GURL; | 48 class GURL; |
49 class TabContents; | 49 class TabContents; |
50 struct DownloadCreateInfo; | 50 struct DownloadCreateInfo; |
51 struct DownloadRetrieveInfo; | 51 struct DownloadRetrieveInfo; |
52 struct DownloadSaveInfo; | 52 struct DownloadSaveInfo; |
53 | 53 |
| 54 namespace net { |
| 55 class NetLog; |
| 56 } // namespace net |
| 57 |
54 namespace content { | 58 namespace content { |
55 class BrowserContext; | 59 class BrowserContext; |
56 class DownloadManagerDelegate; | 60 class DownloadManagerDelegate; |
57 class DownloadQuery; | 61 class DownloadQuery; |
58 class WebContents; | 62 class WebContents; |
59 | 63 |
60 // Browser's download manager: manages all downloads and destination view. | 64 // Browser's download manager: manages all downloads and destination view. |
61 class CONTENT_EXPORT DownloadManager | 65 class CONTENT_EXPORT DownloadManager |
62 : public base::RefCountedThreadSafe<DownloadManager> { | 66 : public base::RefCountedThreadSafe<DownloadManager> { |
63 public: | 67 public: |
64 virtual ~DownloadManager() {} | 68 virtual ~DownloadManager() {} |
65 | 69 |
66 static DownloadManager* Create( | 70 static DownloadManager* Create( |
67 DownloadManagerDelegate* delegate); | 71 DownloadManagerDelegate* delegate, |
| 72 net::NetLog* net_log); |
68 | 73 |
69 // Shutdown the download manager. Must be called before destruction. | 74 // Shutdown the download manager. Must be called before destruction. |
70 virtual void Shutdown() = 0; | 75 virtual void Shutdown() = 0; |
71 | 76 |
72 // Interface to implement for observers that wish to be informed of changes | 77 // Interface to implement for observers that wish to be informed of changes |
73 // to the DownloadManager's collection of downloads. | 78 // to the DownloadManager's collection of downloads. |
74 class CONTENT_EXPORT Observer { | 79 class CONTENT_EXPORT Observer { |
75 public: | 80 public: |
76 // New or deleted download, observers should query us for the current set | 81 // New or deleted download, observers should query us for the current set |
77 // of downloads. | 82 // of downloads. |
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
273 friend class base::RefCountedThreadSafe< | 278 friend class base::RefCountedThreadSafe< |
274 DownloadManager, content::BrowserThread::DeleteOnUIThread>; | 279 DownloadManager, content::BrowserThread::DeleteOnUIThread>; |
275 friend struct content::BrowserThread::DeleteOnThread< | 280 friend struct content::BrowserThread::DeleteOnThread< |
276 content::BrowserThread::UI>; | 281 content::BrowserThread::UI>; |
277 friend class base::DeleteHelper<DownloadManager>; | 282 friend class base::DeleteHelper<DownloadManager>; |
278 }; | 283 }; |
279 | 284 |
280 } // namespace content | 285 } // namespace content |
281 | 286 |
282 #endif // CONTENT_PUBLIC_BROWSER_DOWNLOAD_MANAGER_H_ | 287 #endif // CONTENT_PUBLIC_BROWSER_DOWNLOAD_MANAGER_H_ |
OLD | NEW |