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

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

Issue 10933083: Remove deprecated gfx::Image::operator NSImage*(). (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Comments and merge Created 8 years, 3 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
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 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 NSString* dangerousWarning; 174 NSString* dangerousWarning;
175 NSString* confirmButtonTitle; 175 NSString* confirmButtonTitle;
176 NSImage* alertIcon; 176 NSImage* alertIcon;
177 177
178 dangerousWarning = 178 dangerousWarning =
179 base::SysUTF16ToNSString(downloadModel->GetWarningText( 179 base::SysUTF16ToNSString(downloadModel->GetWarningText(
180 *font_, kTextWidth)); 180 *font_, kTextWidth));
181 confirmButtonTitle = 181 confirmButtonTitle =
182 base::SysUTF16ToNSString(downloadModel->GetWarningConfirmButtonText()); 182 base::SysUTF16ToNSString(downloadModel->GetWarningConfirmButtonText());
183 if (downloadModel->IsMalicious()) 183 if (downloadModel->IsMalicious())
184 alertIcon = rb.GetNativeImageNamed(IDR_SAFEBROWSING_WARNING); 184 alertIcon = rb.GetNativeImageNamed(IDR_SAFEBROWSING_WARNING).ToNSImage();
185 else 185 else
186 alertIcon = rb.GetNativeImageNamed(IDR_WARNING); 186 alertIcon = rb.GetNativeImageNamed(IDR_WARNING).ToNSImage();
187 DCHECK(alertIcon); 187 DCHECK(alertIcon);
188 [image_ setImage:alertIcon]; 188 [image_ setImage:alertIcon];
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.
(...skipping 175 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

Powered by Google App Engine
This is Rietveld 408576698