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

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

Issue 16051006: ui/gfx: Use base::string16 now that string16 was moved into base namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 6 months 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
« no previous file with comments | « ui/gfx/platform_font_mac.h ('k') | ui/gfx/platform_font_pango.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_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/memory/scoped_nsobject.h" 10 #include "base/memory/scoped_nsobject.h"
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 } 56 }
57 57
58 int PlatformFontMac::GetBaseline() const { 58 int PlatformFontMac::GetBaseline() const {
59 return ascent_; 59 return ascent_;
60 } 60 }
61 61
62 int PlatformFontMac::GetAverageCharacterWidth() const { 62 int PlatformFontMac::GetAverageCharacterWidth() const {
63 return average_width_; 63 return average_width_;
64 } 64 }
65 65
66 int PlatformFontMac::GetStringWidth(const string16& text) const { 66 int PlatformFontMac::GetStringWidth(const base::string16& text) const {
67 return Canvas::GetStringWidth(text, 67 return Canvas::GetStringWidth(text,
68 Font(const_cast<PlatformFontMac*>(this))); 68 Font(const_cast<PlatformFontMac*>(this)));
69 } 69 }
70 70
71 int PlatformFontMac::GetExpectedTextWidth(int length) const { 71 int PlatformFontMac::GetExpectedTextWidth(int length) const {
72 return length * average_width_; 72 return length * average_width_;
73 } 73 }
74 74
75 int PlatformFontMac::GetStyle() const { 75 int PlatformFontMac::GetStyle() const {
76 return style_; 76 return style_;
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 } 146 }
147 147
148 // static 148 // static
149 PlatformFont* PlatformFont::CreateFromNameAndSize(const std::string& font_name, 149 PlatformFont* PlatformFont::CreateFromNameAndSize(const std::string& font_name,
150 int font_size) { 150 int font_size) {
151 return new PlatformFontMac(font_name, font_size); 151 return new PlatformFontMac(font_name, font_size);
152 } 152 }
153 153
154 } // namespace gfx 154 } // namespace gfx
155 155
OLDNEW
« no previous file with comments | « ui/gfx/platform_font_mac.h ('k') | ui/gfx/platform_font_pango.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698