OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "base/sys_string_conversions.h" | 7 #include "base/sys_string_conversions.h" |
8 #include "chrome/browser/download/download_item_model.h" | 8 #include "chrome/browser/download/download_item_model.h" |
9 #include "chrome/browser/download/download_util.h" | 9 #include "chrome/browser/download/download_util.h" |
10 #import "chrome/browser/themes/theme_service.h" | 10 #import "chrome/browser/themes/theme_service.h" |
(...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
345 | 345 |
346 - (NSString*)elideStatus:(int)availableWidth { | 346 - (NSString*)elideStatus:(int)availableWidth { |
347 NSFont* font = [self secondaryFont]; | 347 NSFont* font = [self secondaryFont]; |
348 gfx::Font font_chr(base::SysNSStringToUTF8([font fontName]), | 348 gfx::Font font_chr(base::SysNSStringToUTF8([font fontName]), |
349 [font pointSize]); | 349 [font pointSize]); |
350 | 350 |
351 return base::SysUTF16ToNSString(ui::ElideText( | 351 return base::SysUTF16ToNSString(ui::ElideText( |
352 base::SysNSStringToUTF16([self secondaryTitle]), | 352 base::SysNSStringToUTF16([self secondaryTitle]), |
353 font_chr, | 353 font_chr, |
354 availableWidth, | 354 availableWidth, |
355 false)); | 355 ui::ELIDE_AT_END)); |
356 } | 356 } |
357 | 357 |
358 - (ui::ThemeProvider*)backgroundThemeWrappingProvider: | 358 - (ui::ThemeProvider*)backgroundThemeWrappingProvider: |
359 (ui::ThemeProvider*)provider { | 359 (ui::ThemeProvider*)provider { |
360 if (!themeProvider_.get()) { | 360 if (!themeProvider_.get()) { |
361 themeProvider_.reset(new BackgroundTheme(provider)); | 361 themeProvider_.reset(new BackgroundTheme(provider)); |
362 } | 362 } |
363 | 363 |
364 return themeProvider_.get(); | 364 return themeProvider_.get(); |
365 } | 365 } |
(...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
684 } | 684 } |
685 return self; | 685 return self; |
686 } | 686 } |
687 | 687 |
688 - (void)setCurrentProgress:(NSAnimationProgress)progress { | 688 - (void)setCurrentProgress:(NSAnimationProgress)progress { |
689 [super setCurrentProgress:progress]; | 689 [super setCurrentProgress:progress]; |
690 [cell_ animation:self progressed:progress]; | 690 [cell_ animation:self progressed:progress]; |
691 } | 691 } |
692 | 692 |
693 @end | 693 @end |
OLD | NEW |