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

Unified Diff: chrome/browser/download/download_ui_controller.h

Issue 966983002: downloads: clicking "remove" on chrome://downloads should also hide shelf item. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: probably more like this Created 5 years, 10 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
« no previous file with comments | « chrome/browser/download/download_service.cc ('k') | chrome/browser/download/download_ui_controller.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/download/download_ui_controller.h
diff --git a/chrome/browser/download/download_ui_controller.h b/chrome/browser/download/download_ui_controller.h
index 767b87c42fa7ebc43db0e243100458194effaa62..96a3b66a933971b16ae4b0290d5f386ebe479f09 100644
--- a/chrome/browser/download/download_ui_controller.h
+++ b/chrome/browser/download/download_ui_controller.h
@@ -12,29 +12,10 @@
// This class handles the task of observing a single DownloadManager for
// notifying the UI when a new download should be displayed in the UI.
-// It invokes the OnNewDownloadReady() method of hte Delegate when the
-// target path is available for a new download.
class DownloadUIController : public AllDownloadItemNotifier::Observer {
public:
- // The delegate is responsible for figuring out how to notify the UI.
- class Delegate {
- public:
- virtual ~Delegate();
-
- // This method is invoked to notify the UI of the new download |item|. Note
- // that |item| may be in any state by the time this method is invoked.
- virtual void OnNewDownloadReady(content::DownloadItem* item) = 0;
- };
-
- // |manager| is the download manager to observe for new downloads. If
- // |delegate.get()| is NULL, then the default delegate is constructed.
- //
- // On Android the default delegate notifies DownloadControllerAndroid. On
- // other platforms the target of the notification is a Browser object.
- //
- // Currently explicit delegates are only used for testing.
- DownloadUIController(content::DownloadManager* manager,
- scoped_ptr<Delegate> delegate);
Dan Beam 2015/02/28 04:46:04 I can do this cleanup separately, but I couldn't f
Dan Beam 2015/02/28 07:10:27 nvm, used in tests. stupid codesearch.
Dan Beam 2015/03/02 18:50:09 restored, ptal
+ // |manager| is the download manager to observe for new downloads.
+ explicit DownloadUIController(content::DownloadManager* manager);
~DownloadUIController() override;
@@ -46,8 +27,6 @@ class DownloadUIController : public AllDownloadItemNotifier::Observer {
AllDownloadItemNotifier download_notifier_;
- scoped_ptr<Delegate> delegate_;
-
DISALLOW_COPY_AND_ASSIGN(DownloadUIController);
};
« no previous file with comments | « chrome/browser/download/download_service.cc ('k') | chrome/browser/download/download_ui_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698