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

Unified Diff: chrome/browser/cocoa/download_item_controller.mm

Issue 180036: Make download items drag sources on OS X. (Closed)
Patch Set: comments Created 10 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/cocoa/download_item_controller.h ('k') | chrome/browser/cocoa/draggable_button.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/cocoa/download_item_controller.mm
diff --git a/chrome/browser/cocoa/download_item_controller.mm b/chrome/browser/cocoa/download_item_controller.mm
index 9e1651b4a0bc5d03ce66a93effff0944167cc805..b2ff7ff84d6a873fbd04a60bfbb23f5a2d18a052 100644
--- a/chrome/browser/cocoa/download_item_controller.mm
+++ b/chrome/browser/cocoa/download_item_controller.mm
@@ -9,6 +9,7 @@
#include "app/resource_bundle.h"
#include "base/mac_util.h"
#include "base/sys_string_conversions.h"
+#import "chrome/browser/cocoa/download_item_button.h"
#import "chrome/browser/cocoa/download_item_cell.h"
#include "chrome/browser/cocoa/download_item_mac.h"
#import "chrome/browser/cocoa/download_shelf_controller.h"
@@ -161,11 +162,13 @@ class DownloadShelfContextMenuMac : public DownloadShelfContextMenu {
return;
}
- // Set the correct popup menu.
- if (downloadModel->download()->state() == DownloadItem::COMPLETE)
+ // Set correct popup menu. Also, set draggable download on completion.
+ if (downloadModel->download()->state() == DownloadItem::COMPLETE) {
currentMenu_ = completeDownloadMenu_;
- else
+ [progressView_ setDownload:downloadModel->download()->full_path()];
+ } else {
currentMenu_ = activeDownloadMenu_;
+ }
[progressView_ setMenu:currentMenu_]; // for context menu
[cell_ setStateFromDownload:downloadModel];
« no previous file with comments | « chrome/browser/cocoa/download_item_controller.h ('k') | chrome/browser/cocoa/draggable_button.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698