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

Side by Side Diff: chrome/browser/download/all_download_item_notifier.cc

Issue 722953002: downloads: add the ability to undo download removal. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: dcheck Created 6 years, 1 month 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/download/all_download_item_notifier.h" 5 #include "chrome/browser/download/all_download_item_notifier.h"
6 6
7 AllDownloadItemNotifier::AllDownloadItemNotifier( 7 AllDownloadItemNotifier::AllDownloadItemNotifier(
8 content::DownloadManager* manager, 8 content::DownloadManager* manager,
9 AllDownloadItemNotifier::Observer* observer) 9 AllDownloadItemNotifier::Observer* observer)
10 : manager_(manager), 10 : manager_(manager),
(...skipping 29 matching lines...) Expand all
40 } 40 }
41 41
42 void AllDownloadItemNotifier::OnDownloadCreated( 42 void AllDownloadItemNotifier::OnDownloadCreated(
43 content::DownloadManager* manager, 43 content::DownloadManager* manager,
44 content::DownloadItem* item) { 44 content::DownloadItem* item) {
45 item->AddObserver(this); 45 item->AddObserver(this);
46 observing_.insert(item); 46 observing_.insert(item);
47 observer_->OnDownloadCreated(manager, item); 47 observer_->OnDownloadCreated(manager, item);
48 } 48 }
49 49
50 void AllDownloadItemNotifier::OnDownloadRevived(
51 content::DownloadManager* manager,
52 content::DownloadItem* item) {
53 observer_->OnDownloadRevived(manager, item);
54 }
55
50 void AllDownloadItemNotifier::OnDownloadUpdated( 56 void AllDownloadItemNotifier::OnDownloadUpdated(
51 content::DownloadItem* item) { 57 content::DownloadItem* item) {
52 observer_->OnDownloadUpdated(manager_, item); 58 observer_->OnDownloadUpdated(manager_, item);
53 } 59 }
54 60
55 void AllDownloadItemNotifier::OnDownloadOpened( 61 void AllDownloadItemNotifier::OnDownloadOpened(
56 content::DownloadItem* item) { 62 content::DownloadItem* item) {
57 observer_->OnDownloadOpened(manager_, item); 63 observer_->OnDownloadOpened(manager_, item);
58 } 64 }
59 65
60 void AllDownloadItemNotifier::OnDownloadRemoved( 66 void AllDownloadItemNotifier::OnDownloadRemoved(
61 content::DownloadItem* item) { 67 content::DownloadItem* item) {
62 observer_->OnDownloadRemoved(manager_, item); 68 observer_->OnDownloadRemoved(manager_, item);
63 } 69 }
64 70
65 void AllDownloadItemNotifier::OnDownloadDestroyed( 71 void AllDownloadItemNotifier::OnDownloadDestroyed(
66 content::DownloadItem* item) { 72 content::DownloadItem* item) {
67 item->RemoveObserver(this); 73 item->RemoveObserver(this);
68 observing_.erase(item); 74 observing_.erase(item);
69 } 75 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698