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_DOWNLOAD_ALL_DOWNLOAD_ITEM_NOTIFIER_H_ | 5 #ifndef CHROME_BROWSER_DOWNLOAD_ALL_DOWNLOAD_ITEM_NOTIFIER_H_ |
6 #define CHROME_BROWSER_DOWNLOAD_ALL_DOWNLOAD_ITEM_NOTIFIER_H_ | 6 #define CHROME_BROWSER_DOWNLOAD_ALL_DOWNLOAD_ITEM_NOTIFIER_H_ |
7 | 7 |
8 #include <set> | 8 #include <set> |
9 | 9 |
10 #include "content/public/browser/download_manager.h" | 10 #include "content/public/browser/download_manager.h" |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 AllDownloadItemNotifier(content::DownloadManager* manager, | 59 AllDownloadItemNotifier(content::DownloadManager* manager, |
60 Observer* observer); | 60 Observer* observer); |
61 | 61 |
62 virtual ~AllDownloadItemNotifier(); | 62 virtual ~AllDownloadItemNotifier(); |
63 | 63 |
64 // Returns NULL if the manager has gone down. | 64 // Returns NULL if the manager has gone down. |
65 content::DownloadManager* GetManager() const { return manager_; } | 65 content::DownloadManager* GetManager() const { return manager_; } |
66 | 66 |
67 private: | 67 private: |
68 // content::DownloadManager::Observer | 68 // content::DownloadManager::Observer |
69 virtual void ManagerGoingDown(content::DownloadManager* manager) OVERRIDE; | 69 virtual void ManagerGoingDown(content::DownloadManager* manager) override; |
70 virtual void OnDownloadCreated(content::DownloadManager* manager, | 70 virtual void OnDownloadCreated(content::DownloadManager* manager, |
71 content::DownloadItem* item) OVERRIDE; | 71 content::DownloadItem* item) override; |
72 | 72 |
73 // content::DownloadItem::Observer | 73 // content::DownloadItem::Observer |
74 virtual void OnDownloadUpdated(content::DownloadItem* item) OVERRIDE; | 74 virtual void OnDownloadUpdated(content::DownloadItem* item) override; |
75 virtual void OnDownloadOpened(content::DownloadItem* item) OVERRIDE; | 75 virtual void OnDownloadOpened(content::DownloadItem* item) override; |
76 virtual void OnDownloadRemoved(content::DownloadItem* item) OVERRIDE; | 76 virtual void OnDownloadRemoved(content::DownloadItem* item) override; |
77 virtual void OnDownloadDestroyed(content::DownloadItem* item) OVERRIDE; | 77 virtual void OnDownloadDestroyed(content::DownloadItem* item) override; |
78 | 78 |
79 content::DownloadManager* manager_; | 79 content::DownloadManager* manager_; |
80 AllDownloadItemNotifier::Observer* observer_; | 80 AllDownloadItemNotifier::Observer* observer_; |
81 std::set<content::DownloadItem*> observing_; | 81 std::set<content::DownloadItem*> observing_; |
82 | 82 |
83 DISALLOW_COPY_AND_ASSIGN(AllDownloadItemNotifier); | 83 DISALLOW_COPY_AND_ASSIGN(AllDownloadItemNotifier); |
84 }; | 84 }; |
85 | 85 |
86 #endif // CHROME_BROWSER_DOWNLOAD_ALL_DOWNLOAD_ITEM_NOTIFIER_H_ | 86 #endif // CHROME_BROWSER_DOWNLOAD_ALL_DOWNLOAD_ITEM_NOTIFIER_H_ |
OLD | NEW |