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

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

Issue 8392017: Change string16 to std::string in the gfx::Font() interface. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Add 'UTF-8' everywhere in the comments Created 9 years, 1 month 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) 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 318 matching lines...) Expand 10 before | Expand all | Expand 10 after
329 radius:radius]; 329 radius:radius];
330 [path appendBezierPathWithArcFromPoint:topRight 330 [path appendBezierPathWithArcFromPoint:topRight
331 toPoint:topLeft 331 toPoint:topLeft
332 radius:radius]; 332 radius:radius];
333 [path lineToPoint:topLeft]; 333 [path lineToPoint:topLeft];
334 return path; 334 return path;
335 } 335 }
336 336
337 - (NSString*)elideTitle:(int)availableWidth { 337 - (NSString*)elideTitle:(int)availableWidth {
338 NSFont* font = [self font]; 338 NSFont* font = [self font];
339 gfx::Font font_chr(base::SysNSStringToUTF16([font fontName]), 339 gfx::Font font_chr(base::SysNSStringToUTF8([font fontName]),
340 [font pointSize]); 340 [font pointSize]);
341 341
342 return base::SysUTF16ToNSString( 342 return base::SysUTF16ToNSString(
343 ui::ElideFilename(downloadPath_, font_chr, availableWidth)); 343 ui::ElideFilename(downloadPath_, font_chr, availableWidth));
344 } 344 }
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::SysNSStringToUTF16([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 false));
356 } 356 }
357 357
358 - (ui::ThemeProvider*)backgroundThemeWrappingProvider: 358 - (ui::ThemeProvider*)backgroundThemeWrappingProvider:
(...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698