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 #ifndef CHROME_BROWSER_EXTENSIONS_API_DOWNLOADS_DOWNLOADS_API_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_DOWNLOADS_DOWNLOADS_API_H_ |
6 #define CHROME_BROWSER_EXTENSIONS_API_DOWNLOADS_DOWNLOADS_API_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_API_DOWNLOADS_DOWNLOADS_API_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <set> | 9 #include <set> |
10 #include <string> | 10 #include <string> |
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
219 Profile* profile, content::DownloadManager* manager); | 219 Profile* profile, content::DownloadManager* manager); |
220 virtual ~ExtensionDownloadsEventRouter(); | 220 virtual ~ExtensionDownloadsEventRouter(); |
221 | 221 |
222 // content::DownloadManager::Observer | 222 // content::DownloadManager::Observer |
223 virtual void OnDownloadCreated(content::DownloadManager* manager, | 223 virtual void OnDownloadCreated(content::DownloadManager* manager, |
224 content::DownloadItem* download_item) OVERRIDE; | 224 content::DownloadItem* download_item) OVERRIDE; |
225 virtual void ManagerGoingDown(content::DownloadManager* manager) OVERRIDE; | 225 virtual void ManagerGoingDown(content::DownloadManager* manager) OVERRIDE; |
226 | 226 |
227 // content::DownloadItem::Observer | 227 // content::DownloadItem::Observer |
228 virtual void OnDownloadUpdated(content::DownloadItem* download) OVERRIDE; | 228 virtual void OnDownloadUpdated(content::DownloadItem* download) OVERRIDE; |
229 virtual void OnDownloadRemoved(content::DownloadItem* download) OVERRIDE; | 229 virtual void OnDownloadOpened(content::DownloadItem* download) OVERRIDE; |
230 virtual void OnDownloadDestroyed(content::DownloadItem* download) OVERRIDE; | |
231 | 230 |
232 // Used for testing. | 231 // Used for testing. |
233 struct DownloadsNotificationSource { | 232 struct DownloadsNotificationSource { |
234 std::string event_name; | 233 std::string event_name; |
235 Profile* profile; | 234 Profile* profile; |
236 }; | 235 }; |
237 | 236 |
238 private: | 237 private: |
239 struct OnChangedStat { | 238 struct OnChangedStat { |
240 OnChangedStat(); | 239 OnChangedStat(); |
(...skipping 11 matching lines...) Expand all Loading... |
252 Profile* profile_; | 251 Profile* profile_; |
253 content::DownloadManager* manager_; | 252 content::DownloadManager* manager_; |
254 ItemMap downloads_; | 253 ItemMap downloads_; |
255 ItemJsonMap item_jsons_; | 254 ItemJsonMap item_jsons_; |
256 OnChangedStatMap on_changed_stats_; | 255 OnChangedStatMap on_changed_stats_; |
257 | 256 |
258 DISALLOW_COPY_AND_ASSIGN(ExtensionDownloadsEventRouter); | 257 DISALLOW_COPY_AND_ASSIGN(ExtensionDownloadsEventRouter); |
259 }; | 258 }; |
260 | 259 |
261 #endif // CHROME_BROWSER_EXTENSIONS_API_DOWNLOADS_DOWNLOADS_API_H_ | 260 #endif // CHROME_BROWSER_EXTENSIONS_API_DOWNLOADS_DOWNLOADS_API_H_ |
OLD | NEW |