OLD | NEW |
(Empty) | |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CHROME_BROWSER_DOWNLOAD_NOTIFICATION_DOWNLOAD_NOTIFICATION_MANAGER_H_ |
| 6 #define CHROME_BROWSER_DOWNLOAD_NOTIFICATION_DOWNLOAD_NOTIFICATION_MANAGER_H_ |
| 7 |
| 8 #include <set> |
| 9 |
| 10 #include "chrome/browser/download/download_ui_controller.h" |
| 11 #include "chrome/browser/download/notification/download_notification_item.h" |
| 12 #include "chrome/browser/profiles/profile.h" |
| 13 |
| 14 class Profile; |
| 15 |
| 16 class DownloadNotificationManager : public DownloadUIController::Delegate, |
| 17 public DownloadNotificationItem::Delegate { |
| 18 public: |
| 19 explicit DownloadNotificationManager(Profile* profile); |
| 20 ~DownloadNotificationManager() override; |
| 21 |
| 22 // DownloadUIController::Delegate: |
| 23 void OnNewDownloadReady(content::DownloadItem* item) override; |
| 24 |
| 25 // DownloadNotificationItem::Delegate: |
| 26 void OnDownloadStarted(DownloadNotificationItem* item) override; |
| 27 void OnDownloadStopped(DownloadNotificationItem* item) override; |
| 28 void OnDownloadRemoved(DownloadNotificationItem* item) override; |
| 29 |
| 30 private: |
| 31 std::set<DownloadNotificationItem*> downloading_items_; |
| 32 std::set<DownloadNotificationItem*> items_; |
| 33 |
| 34 STLElementDeleter<std::set<DownloadNotificationItem*>> items_deleter_; |
| 35 }; |
| 36 |
| 37 #endif // CHROME_BROWSER_DOWNLOAD_NOTIFICATION_DOWNLOAD_NOTIFICATION_MANAGER_H_ |
OLD | NEW |