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.
5 #ifndef CHROME_BROWSER_DOWNLOAD_NOTIFICATION_DOWNLOAD_NOTIFICATION_MANAGER_H_
6 #define CHROME_BROWSER_DOWNLOAD_NOTIFICATION_DOWNLOAD_NOTIFICATION_MANAGER_H_
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"
16 class DownloadNotificationManager
: public DownloadUIController::Delegate
,
17 public DownloadNotificationItem::Delegate
{
19 explicit DownloadNotificationManager(Profile
* profile
);
20 ~DownloadNotificationManager() override
;
22 // DownloadUIController::Delegate:
23 void OnNewDownloadReady(content::DownloadItem
* item
) override
;
25 // DownloadNotificationItem::Delegate:
26 void OnDownloadStarted(DownloadNotificationItem
* item
) override
;
27 void OnDownloadStopped(DownloadNotificationItem
* item
) override
;
28 void OnDownloadRemoved(DownloadNotificationItem
* item
) override
;
31 std::set
<DownloadNotificationItem
*> downloading_items_
;
32 std::set
<DownloadNotificationItem
*> items_
;
34 STLElementDeleter
<std::set
<DownloadNotificationItem
*>> items_deleter_
;
37 #endif // CHROME_BROWSER_DOWNLOAD_NOTIFICATION_DOWNLOAD_NOTIFICATION_MANAGER_H_