Chromium Code Reviews| Index: chrome/browser/download/notification/download_notification_manager.h |
| diff --git a/chrome/browser/download/notification/download_notification_manager.h b/chrome/browser/download/notification/download_notification_manager.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..61d0179d6d380c3186ef4a28af9cde2b581f444b |
| --- /dev/null |
| +++ b/chrome/browser/download/notification/download_notification_manager.h |
| @@ -0,0 +1,38 @@ |
| +// Copyright 2015 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef CHROME_BROWSER_DOWNLOAD_NOTIFICATION_DOWNLOAD_NOTIFICATION_MANAGER_H_ |
| +#define CHROME_BROWSER_DOWNLOAD_NOTIFICATION_DOWNLOAD_NOTIFICATION_MANAGER_H_ |
| + |
| +#include <set> |
| + |
| +#include "chrome/browser/download/download_ui_controller.h" |
| +#include "chrome/browser/download/notification/download_notification_item.h" |
| + |
| +class Profile; |
| + |
| +class DownloadNotificationManager : public DownloadUIController::Delegate, |
| + public DownloadNotificationItem::Delegate { |
| + public: |
| + explicit DownloadNotificationManager(Profile* profile); |
| + ~DownloadNotificationManager() override; |
| + |
| + // DownloadManager::Observer: |
|
asanka
2015/01/31 00:38:51
DownloadUIController::Delegate.
yoshiki
2015/02/04 19:03:01
Done.
|
| + void OnNewDownloadReady(content::DownloadItem* item) override; |
| + |
|
asanka
2015/01/31 00:38:51
// DownloadNotificationItem::Delegate
yoshiki
2015/02/04 19:03:01
Done.
|
| + void OnDownloadNotificationItemDestroying( |
| + DownloadNotificationItem* item) override; |
| + void OnDownloadStarted(DownloadNotificationItem* item) override; |
| + void OnDownloadStopped(DownloadNotificationItem* item) override; |
| + |
| + private: |
| + void UpdateDownloadingMultipleFiles(); |
| + |
| + Profile* profile_; |
| + bool is_downloading_multiple_files_; |
| + std::set<DownloadNotificationItem*> downloading_items_; |
| + std::set<DownloadNotificationItem*> items_; |
| +}; |
| + |
| +#endif // CHROME_BROWSER_DOWNLOAD_NOTIFICATION_DOWNLOAD_NOTIFICATION_MANAGER_H_ |