| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_cell.h" | 5 #import "chrome/browser/ui/cocoa/download/download_item_cell.h" |
| 6 | 6 |
| 7 #include "app/l10n_util.h" | 7 #include "app/l10n_util.h" |
| 8 #include "app/text_elider.h" | 8 #include "app/text_elider.h" |
| 9 #include "base/sys_string_conversions.h" | 9 #include "base/sys_string_conversions.h" |
| 10 #include "chrome/browser/download/download_item.h" | 10 #include "chrome/browser/download/download_item.h" |
| (...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 387 radius:radius]; | 387 radius:radius]; |
| 388 [path appendBezierPathWithArcFromPoint:topRight | 388 [path appendBezierPathWithArcFromPoint:topRight |
| 389 toPoint:topLeft | 389 toPoint:topLeft |
| 390 radius:radius]; | 390 radius:radius]; |
| 391 [path lineToPoint:topLeft]; | 391 [path lineToPoint:topLeft]; |
| 392 return path; | 392 return path; |
| 393 } | 393 } |
| 394 | 394 |
| 395 - (NSString*)elideTitle:(int)availableWidth { | 395 - (NSString*)elideTitle:(int)availableWidth { |
| 396 NSFont* font = [self font]; | 396 NSFont* font = [self font]; |
| 397 gfx::Font font_chr(base::SysNSStringToWide([font fontName]), | 397 gfx::Font font_chr(base::SysNSStringToUTF16([font fontName]), |
| 398 [font pointSize]); | 398 [font pointSize]); |
| 399 | 399 |
| 400 return base::SysUTF16ToNSString( | 400 return base::SysUTF16ToNSString( |
| 401 ElideFilename(downloadPath_, font_chr, availableWidth)); | 401 ElideFilename(downloadPath_, font_chr, availableWidth)); |
| 402 } | 402 } |
| 403 | 403 |
| 404 - (NSString*)elideStatus:(int)availableWidth { | 404 - (NSString*)elideStatus:(int)availableWidth { |
| 405 NSFont* font = [self secondaryFont]; | 405 NSFont* font = [self secondaryFont]; |
| 406 gfx::Font font_chr(base::SysNSStringToWide([font fontName]), | 406 gfx::Font font_chr(base::SysNSStringToUTF16([font fontName]), |
| 407 [font pointSize]); | 407 [font pointSize]); |
| 408 | 408 |
| 409 return base::SysUTF16ToNSString(ElideText( | 409 return base::SysUTF16ToNSString(ElideText( |
| 410 base::SysNSStringToUTF16([self secondaryTitle]), | 410 base::SysNSStringToUTF16([self secondaryTitle]), |
| 411 font_chr, | 411 font_chr, |
| 412 availableWidth, | 412 availableWidth, |
| 413 false)); | 413 false)); |
| 414 } | 414 } |
| 415 | 415 |
| 416 - (ThemeProvider*)backgroundThemeWrappingProvider:(ThemeProvider*)provider { | 416 - (ThemeProvider*)backgroundThemeWrappingProvider:(ThemeProvider*)provider { |
| (...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 698 } | 698 } |
| 699 return self; | 699 return self; |
| 700 } | 700 } |
| 701 | 701 |
| 702 - (void)setCurrentProgress:(NSAnimationProgress)progress { | 702 - (void)setCurrentProgress:(NSAnimationProgress)progress { |
| 703 [super setCurrentProgress:progress]; | 703 [super setCurrentProgress:progress]; |
| 704 [cell_ animation:self progressed:progress]; | 704 [cell_ animation:self progressed:progress]; |
| 705 } | 705 } |
| 706 | 706 |
| 707 @end | 707 @end |
| OLD | NEW |