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

Unified Diff: content/browser/download/download_item_impl.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: Implement a separate callbacks flow for 'shown in shell' event to not mix with 'opened' Created 6 years, 7 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: content/browser/download/download_item_impl.h
diff --git a/content/browser/download/download_item_impl.h b/content/browser/download/download_item_impl.h
index e66026285ac5954da1728c86a426dd0fa4717d71..e43e8b1572f204810523b1f24ee3e0ddba4a34fe 100644
--- a/content/browser/download/download_item_impl.h
+++ b/content/browser/download/download_item_impl.h
@@ -148,12 +148,14 @@ class CONTENT_EXPORT DownloadItemImpl
virtual bool GetOpenWhenComplete() const OVERRIDE;
virtual bool GetAutoOpened() OVERRIDE;
virtual bool GetOpened() const OVERRIDE;
+ virtual bool GetShownWhenComplete() const OVERRIDE;
virtual BrowserContext* GetBrowserContext() const OVERRIDE;
virtual WebContents* GetWebContents() const OVERRIDE;
virtual void OnContentCheckCompleted(DownloadDangerType danger_type) OVERRIDE;
virtual void SetOpenWhenComplete(bool open) OVERRIDE;
virtual void SetIsTemporary(bool temporary) OVERRIDE;
virtual void SetOpened(bool opened) OVERRIDE;
+ virtual void SetShownWhenComplete(bool shown) OVERRIDE;
virtual void SetDisplayName(const base::FilePath& name) OVERRIDE;
virtual std::string DebugString(bool verbose) const OVERRIDE;
@@ -538,6 +540,14 @@ class CONTENT_EXPORT DownloadItemImpl
// be treated as though the user opened it.
bool opened_;
+ // Did the user show the item in shell after it was complete? The shelf uses
+ // the value from this field to determine if it can autohide itself, so it
+ // is possible to autohide when user interacted with completed download by
+ // showing the file in shell, instead of opening. The shelf also sets this
+ // field when user closes the shelf before the item has been 'shown in
+ // shell'.
+ bool shownWhenComplete_;
asanka 2014/06/05 19:26:28 Nit: unix_hacker_style_
DukeXar 2014/06/06 15:07:14 Well, I have deleted it at all.
+
// Did the delegate delay calling Complete on this download?
bool delegate_delayed_complete_;

Powered by Google App Engine
This is Rietveld 408576698