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

Side by Side Diff: chrome/browser/ui/cocoa/download/download_item_controller.mm

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 unified diff | Download patch | Annotate | Revision Log
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 #import "chrome/browser/ui/cocoa/download/download_item_controller.h" 5 #import "chrome/browser/ui/cocoa/download/download_item_controller.h"
6 6
7 #include "base/mac/bundle_locations.h" 7 #include "base/mac/bundle_locations.h"
8 #include "base/mac/mac_util.h" 8 #include "base/mac/mac_util.h"
9 #include "base/metrics/histogram.h" 9 #include "base/metrics/histogram.h"
10 #include "base/string16.h" 10 #include "base/string16.h"
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 DCHECK(dangerousWarning); 189 DCHECK(dangerousWarning);
190 [dangerousDownloadLabel_ setStringValue:dangerousWarning]; 190 [dangerousDownloadLabel_ setStringValue:dangerousWarning];
191 DCHECK(confirmButtonTitle); 191 DCHECK(confirmButtonTitle);
192 [dangerousDownloadConfirmButton_ setTitle:confirmButtonTitle]; 192 [dangerousDownloadConfirmButton_ setTitle:confirmButtonTitle];
193 return; 193 return;
194 } 194 }
195 195
196 // Set correct popup menu. Also, set draggable download on completion. 196 // Set correct popup menu. Also, set draggable download on completion.
197 if (downloadModel->download()->IsComplete()) { 197 if (downloadModel->download()->IsComplete()) {
198 [progressView_ setMenu:completeDownloadMenu_]; 198 [progressView_ setMenu:completeDownloadMenu_];
199 [progressView_ setDownload:downloadModel->download()->GetFullPath()]; 199 [progressView_ setDownload:downloadModel->download()->GetTargetFilePath()];
200 } else { 200 } else {
201 [progressView_ setMenu:activeDownloadMenu_]; 201 [progressView_ setMenu:activeDownloadMenu_];
202 } 202 }
203 203
204 [cell_ setStateFromDownload:downloadModel]; 204 [cell_ setStateFromDownload:downloadModel];
205 } 205 }
206 206
207 - (void)setIcon:(NSImage*)icon { 207 - (void)setIcon:(NSImage*)icon {
208 [cell_ setImage:icon]; 208 [cell_ setImage:icon];
209 } 209 }
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
372 [sender setTitle:l10n_util::GetNSStringWithFixup( 372 [sender setTitle:l10n_util::GetNSStringWithFixup(
373 IDS_DOWNLOAD_MENU_PAUSE_ITEM)]; 373 IDS_DOWNLOAD_MENU_PAUSE_ITEM)];
374 } else { 374 } else {
375 [sender setTitle:l10n_util::GetNSStringWithFixup( 375 [sender setTitle:l10n_util::GetNSStringWithFixup(
376 IDS_DOWNLOAD_MENU_RESUME_ITEM)]; 376 IDS_DOWNLOAD_MENU_RESUME_ITEM)];
377 } 377 }
378 menuBridge_->ExecuteCommand(DownloadShelfContextMenuMac::TOGGLE_PAUSE); 378 menuBridge_->ExecuteCommand(DownloadShelfContextMenuMac::TOGGLE_PAUSE);
379 } 379 }
380 380
381 @end 381 @end
OLDNEW
« no previous file with comments | « chrome/browser/download/download_util.cc ('k') | chrome/browser/ui/cocoa/download/download_util_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698