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

Side by Side Diff: chrome/common/gfx/chrome_font_skia.cc

Issue 17392: Make resource_bundle compile on Linux. (Closed)
Patch Set: Created 11 years, 11 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
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 "chrome/common/gfx/chrome_font.h" 5 #include "chrome/common/gfx/chrome_font.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/sys_string_conversions.h" 8 #include "base/sys_string_conversions.h"
9 9
10 #include "skia/include/SkTypeface.h" 10 #include "skia/include/SkTypeface.h"
11 #include "skia/include/SkPaint.h" 11 #include "skia/include/SkPaint.h"
12 12
13 ChromeFont::ChromeFont(const ChromeFont& other) { 13 ChromeFont::ChromeFont(const ChromeFont& other) {
14 CopyChromeFont(other); 14 CopyChromeFont(other);
15 } 15 }
16 16
17 ChromeFont& ChromeFont::operator=(const ChromeFont& other) {
18 CopyChromeFont(other);
19 return *this;
20 }
21
17 ChromeFont::ChromeFont(SkTypeface* tf, const std::wstring& font_name, 22 ChromeFont::ChromeFont(SkTypeface* tf, const std::wstring& font_name,
18 int font_size, int style) 23 int font_size, int style)
19 : typeface_helper_(new SkAutoUnref(tf)), 24 : typeface_helper_(new SkAutoUnref(tf)),
20 typeface_(tf), 25 typeface_(tf),
21 font_name_(font_name), 26 font_name_(font_name),
22 font_size_(font_size), 27 font_size_(font_size),
23 style_(style) { 28 style_(style) {
24 calculateMetrics(); 29 calculateMetrics();
25 } 30 }
26 31
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 return font_name_; 147 return font_name_;
143 } 148 }
144 149
145 int ChromeFont::FontSize() { 150 int ChromeFont::FontSize() {
146 return font_size_; 151 return font_size_;
147 } 152 }
148 153
149 NativeFont ChromeFont::nativeFont() const { 154 NativeFont ChromeFont::nativeFont() const {
150 return typeface_; 155 return typeface_;
151 } 156 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698