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

Unified Diff: chrome/browser/download/download_item_model.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: Added browser and unit tests. Renamed 'UserActed' to 'OpenedOrShown'. Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/download/download_browsertest.cc ('k') | chrome/browser/download/download_item_model.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/download/download_item_model.h
diff --git a/chrome/browser/download/download_item_model.h b/chrome/browser/download/download_item_model.h
index 5fe5751dc8fa5269eb7e6f8e60db473ddd086909..c374ba19cd516be85e88f27b4ba8d0da475ffceb 100644
--- a/chrome/browser/download/download_item_model.h
+++ b/chrome/browser/download/download_item_model.h
@@ -165,6 +165,14 @@ class DownloadItemModel {
// Set whether the download is being revived.
void SetIsBeingRevived(bool is_being_revived);
+ // Returns |true| if user opened or shown download item in shell. Download
+ // shelf checks this for autohide.
+ bool GetOpenedOrShown() const;
+
+ // Sets whether download was opened or shown in shell. Download shelf marks
+ // downloads as shown or opened if user manually closes the shelf.
+ void SetOpenedOrShown(bool opened_or_shown);
+
content::DownloadItem* download() { return download_; }
// Returns a string representations of the current download progress sizes. If
« no previous file with comments | « chrome/browser/download/download_browsertest.cc ('k') | chrome/browser/download/download_item_model.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698