Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5143)

Unified Diff: chrome/browser/download/notification/download_notification_manager.h

Issue 852043002: Initial Implementation of Download Notification (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed comments Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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_

Powered by Google App Engine
This is Rietveld 408576698