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

Unified Diff: chrome/browser/ui/gtk/download/download_item_gtk.cc

Issue 11801022: Allow dragging a download only after the download is complete. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge with trunk at 175906 Created 7 years, 11 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/ui/gtk/custom_drag.cc ('k') | chrome/browser/ui/webui/downloads_dom_handler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/gtk/download/download_item_gtk.cc
diff --git a/chrome/browser/ui/gtk/download/download_item_gtk.cc b/chrome/browser/ui/gtk/download/download_item_gtk.cc
index e1da54d07532036dc482dfd47557a1a9d9940123..f102350d47781fc16c351567babc78432f889cee 100644
--- a/chrome/browser/ui/gtk/download/download_item_gtk.cc
+++ b/chrome/browser/ui/gtk/download/download_item_gtk.cc
@@ -458,7 +458,10 @@ void DownloadItemGtk::OnLoadSmallIconComplete(gfx::Image* image) {
void DownloadItemGtk::OnLoadLargeIconComplete(gfx::Image* image) {
icon_large_ = image;
- DownloadItemDrag::SetSource(body_.get(), download(), icon_large_);
+ if (download()->IsComplete())
+ DownloadItemDrag::SetSource(body_.get(), download(), icon_large_);
+ // Else, the download will be made draggable once an OnDownloadUpdated()
+ // notification is received with download->IsComplete().
}
void DownloadItemGtk::LoadIcon() {
« no previous file with comments | « chrome/browser/ui/gtk/custom_drag.cc ('k') | chrome/browser/ui/webui/downloads_dom_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698