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

Side by Side Diff: ui/gfx/platform_font_mac.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_mac.h ('k') | ui/gfx/platform_font_ozone.cc » ('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_mac.h" 5 #include "ui/gfx/platform_font_mac.h"
6 6
7 #include <Cocoa/Cocoa.h> 7 #include <Cocoa/Cocoa.h>
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/mac/scoped_nsobject.h" 10 #include "base/mac/scoped_nsobject.h"
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 } 119 }
120 120
121 int PlatformFontMac::GetStyle() const { 121 int PlatformFontMac::GetStyle() const {
122 return font_style_; 122 return font_style_;
123 } 123 }
124 124
125 std::string PlatformFontMac::GetFontName() const { 125 std::string PlatformFontMac::GetFontName() const {
126 return font_name_; 126 return font_name_;
127 } 127 }
128 128
129 std::string PlatformFontMac::GetActualFontNameForTesting() const {
130 return base::SysNSStringToUTF8([native_font_ familyName]);
131 }
132
129 int PlatformFontMac::GetFontSize() const { 133 int PlatformFontMac::GetFontSize() const {
130 return font_size_; 134 return font_size_;
131 } 135 }
132 136
133 NativeFont PlatformFontMac::GetNativeFont() const { 137 NativeFont PlatformFontMac::GetNativeFont() const {
134 return [[native_font_.get() retain] autorelease]; 138 return [[native_font_.get() retain] autorelease];
135 } 139 }
136 140
137 //////////////////////////////////////////////////////////////////////////////// 141 ////////////////////////////////////////////////////////////////////////////////
138 // PlatformFontMac, private: 142 // PlatformFontMac, private:
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 return new PlatformFontMac(native_font); 188 return new PlatformFontMac(native_font);
185 } 189 }
186 190
187 // static 191 // static
188 PlatformFont* PlatformFont::CreateFromNameAndSize(const std::string& font_name, 192 PlatformFont* PlatformFont::CreateFromNameAndSize(const std::string& font_name,
189 int font_size) { 193 int font_size) {
190 return new PlatformFontMac(font_name, font_size); 194 return new PlatformFontMac(font_name, font_size);
191 } 195 }
192 196
193 } // namespace gfx 197 } // namespace gfx
OLDNEW
« no previous file with comments | « ui/gfx/platform_font_mac.h ('k') | ui/gfx/platform_font_ozone.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698