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

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

Issue 209613002: Download shelf autohides on showing in shell, just same as regular open Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Move the 'user acted' flag into DownloadItemModelData and get rid of SetOpened/SetShown in Download… Created 6 years, 6 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 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 #ifndef CHROME_BROWSER_DOWNLOAD_ALL_DOWNLOAD_ITEM_NOTIFIER_H_ 5 #ifndef CHROME_BROWSER_DOWNLOAD_ALL_DOWNLOAD_ITEM_NOTIFIER_H_
6 #define CHROME_BROWSER_DOWNLOAD_ALL_DOWNLOAD_ITEM_NOTIFIER_H_ 6 #define CHROME_BROWSER_DOWNLOAD_ALL_DOWNLOAD_ITEM_NOTIFIER_H_
7 7
8 #include <set> 8 #include <set>
9 9
10 #include "content/public/browser/download_manager.h" 10 #include "content/public/browser/download_manager.h"
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 virtual ~Observer() {} 44 virtual ~Observer() {}
45 45
46 virtual void OnDownloadCreated( 46 virtual void OnDownloadCreated(
47 content::DownloadManager* manager, content::DownloadItem* item) {} 47 content::DownloadManager* manager, content::DownloadItem* item) {}
48 virtual void OnDownloadUpdated( 48 virtual void OnDownloadUpdated(
49 content::DownloadManager* manager, content::DownloadItem* item) {} 49 content::DownloadManager* manager, content::DownloadItem* item) {}
50 virtual void OnDownloadOpened( 50 virtual void OnDownloadOpened(
51 content::DownloadManager* manager, content::DownloadItem* item) {} 51 content::DownloadManager* manager, content::DownloadItem* item) {}
52 virtual void OnDownloadRemoved( 52 virtual void OnDownloadRemoved(
53 content::DownloadManager* manager, content::DownloadItem* item) {} 53 content::DownloadManager* manager, content::DownloadItem* item) {}
54 virtual void OnDownloadShown(
55 content::DownloadManager* manager, content::DownloadItem* item) {}
54 56
55 private: 57 private:
56 DISALLOW_COPY_AND_ASSIGN(Observer); 58 DISALLOW_COPY_AND_ASSIGN(Observer);
57 }; 59 };
58 60
59 AllDownloadItemNotifier(content::DownloadManager* manager, 61 AllDownloadItemNotifier(content::DownloadManager* manager,
60 Observer* observer); 62 Observer* observer);
61 63
62 virtual ~AllDownloadItemNotifier(); 64 virtual ~AllDownloadItemNotifier();
63 65
64 // Returns NULL if the manager has gone down. 66 // Returns NULL if the manager has gone down.
65 content::DownloadManager* GetManager() const { return manager_; } 67 content::DownloadManager* GetManager() const { return manager_; }
66 68
67 private: 69 private:
68 // content::DownloadManager::Observer 70 // content::DownloadManager::Observer
69 virtual void ManagerGoingDown(content::DownloadManager* manager) OVERRIDE; 71 virtual void ManagerGoingDown(content::DownloadManager* manager) OVERRIDE;
70 virtual void OnDownloadCreated(content::DownloadManager* manager, 72 virtual void OnDownloadCreated(content::DownloadManager* manager,
71 content::DownloadItem* item) OVERRIDE; 73 content::DownloadItem* item) OVERRIDE;
72 74
73 // content::DownloadItem::Observer 75 // content::DownloadItem::Observer
74 virtual void OnDownloadUpdated(content::DownloadItem* item) OVERRIDE; 76 virtual void OnDownloadUpdated(content::DownloadItem* item) OVERRIDE;
75 virtual void OnDownloadOpened(content::DownloadItem* item) OVERRIDE; 77 virtual void OnDownloadOpened(content::DownloadItem* item) OVERRIDE;
76 virtual void OnDownloadRemoved(content::DownloadItem* item) OVERRIDE; 78 virtual void OnDownloadRemoved(content::DownloadItem* item) OVERRIDE;
79 virtual void OnDownloadShown(content::DownloadItem* item) OVERRIDE;
77 virtual void OnDownloadDestroyed(content::DownloadItem* item) OVERRIDE; 80 virtual void OnDownloadDestroyed(content::DownloadItem* item) OVERRIDE;
78 81
79 content::DownloadManager* manager_; 82 content::DownloadManager* manager_;
80 AllDownloadItemNotifier::Observer* observer_; 83 AllDownloadItemNotifier::Observer* observer_;
81 std::set<content::DownloadItem*> observing_; 84 std::set<content::DownloadItem*> observing_;
82 85
83 DISALLOW_COPY_AND_ASSIGN(AllDownloadItemNotifier); 86 DISALLOW_COPY_AND_ASSIGN(AllDownloadItemNotifier);
84 }; 87 };
85 88
86 #endif // CHROME_BROWSER_DOWNLOAD_ALL_DOWNLOAD_ITEM_NOTIFIER_H_ 89 #endif // CHROME_BROWSER_DOWNLOAD_ALL_DOWNLOAD_ITEM_NOTIFIER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698