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

Side by Side Diff: ui/gfx/platform_font_ios.mm

Issue 79263004: Enables font-related unittests again. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Synced. Created 7 years 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
« no previous file with comments | « ui/gfx/platform_font_ios.h ('k') | ui/gfx/platform_font_mac.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include "ui/gfx/platform_font_ios.h" 5 #include "ui/gfx/platform_font_ios.h"
6 6
7 #import <UIKit/UIKit.h> 7 #import <UIKit/UIKit.h>
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/strings/sys_string_conversions.h" 10 #include "base/strings/sys_string_conversions.h"
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 } 69 }
70 70
71 int PlatformFontIOS::GetStyle() const { 71 int PlatformFontIOS::GetStyle() const {
72 return style_; 72 return style_;
73 } 73 }
74 74
75 std::string PlatformFontIOS::GetFontName() const { 75 std::string PlatformFontIOS::GetFontName() const {
76 return font_name_; 76 return font_name_;
77 } 77 }
78 78
79 std::string PlatformFontIOS::GetActualFontNameForTesting() const {
80 return base::SysNSStringToUTF8([GetNativeFont() familyName]);
81 }
82
79 int PlatformFontIOS::GetFontSize() const { 83 int PlatformFontIOS::GetFontSize() const {
80 return font_size_; 84 return font_size_;
81 } 85 }
82 86
83 NativeFont PlatformFontIOS::GetNativeFont() const { 87 NativeFont PlatformFontIOS::GetNativeFont() const {
84 return [UIFont fontWithName:base::SysUTF8ToNSString(font_name_) 88 return [UIFont fontWithName:base::SysUTF8ToNSString(font_name_)
85 size:font_size_]; 89 size:font_size_];
86 } 90 }
87 91
88 //////////////////////////////////////////////////////////////////////////////// 92 ////////////////////////////////////////////////////////////////////////////////
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 return new PlatformFontIOS(native_font); 128 return new PlatformFontIOS(native_font);
125 } 129 }
126 130
127 // static 131 // static
128 PlatformFont* PlatformFont::CreateFromNameAndSize(const std::string& font_name, 132 PlatformFont* PlatformFont::CreateFromNameAndSize(const std::string& font_name,
129 int font_size) { 133 int font_size) {
130 return new PlatformFontIOS(font_name, font_size); 134 return new PlatformFontIOS(font_name, font_size);
131 } 135 }
132 136
133 } // namespace gfx 137 } // namespace gfx
OLDNEW
« no previous file with comments | « ui/gfx/platform_font_ios.h ('k') | ui/gfx/platform_font_mac.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698