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

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

Issue 1133713009: Subject .mm files to the header sorting presubmit (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase - of course... it would be one of my patches I conflict with :| Created 5 years, 7 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/canvas_unittest_mac.mm ('k') | ui/gfx/ios/NSString+CrStringDrawing_unittest.mm » ('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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/font_fallback.h" 5 #include "ui/gfx/font_fallback.h"
6 6
7 #include <dlfcn.h>
7 #import <Foundation/Foundation.h> 8 #import <Foundation/Foundation.h>
8 #include <dlfcn.h>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
11 11
12 #import "base/strings/sys_string_conversions.h"
13 #include "base/mac/foundation_util.h" 12 #include "base/mac/foundation_util.h"
14 #import "base/mac/mac_util.h" 13 #import "base/mac/mac_util.h"
14 #import "base/strings/sys_string_conversions.h"
15 15
16 // CTFontCopyDefaultCascadeListForLanguages() doesn't exist in the 10.6 SDK. 16 // CTFontCopyDefaultCascadeListForLanguages() doesn't exist in the 10.6 SDK.
17 // There is only the following. It doesn't exist in the public header files, 17 // There is only the following. It doesn't exist in the public header files,
18 // but is an exported symbol so should always link. 18 // but is an exported symbol so should always link.
19 extern "C" CFArrayRef CTFontCopyDefaultCascadeList(CTFontRef font_ref); 19 extern "C" CFArrayRef CTFontCopyDefaultCascadeList(CTFontRef font_ref);
20 20
21 namespace { 21 namespace {
22 22
23 // Wrapper for CTFontCopyDefaultCascadeListForLanguages() which should appear in 23 // Wrapper for CTFontCopyDefaultCascadeListForLanguages() which should appear in
24 // CoreText.h from 10.8 onwards. 24 // CoreText.h from 10.8 onwards.
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 fallback_fonts.push_back(base::SysCFStringRefToUTF8(font_name)); 93 fallback_fonts.push_back(base::SysCFStringRefToUTF8(font_name));
94 } 94 }
95 95
96 if (fallback_fonts.empty()) 96 if (fallback_fonts.empty())
97 return std::vector<std::string>(1, font_family); 97 return std::vector<std::string>(1, font_family);
98 98
99 return fallback_fonts; 99 return fallback_fonts;
100 } 100 }
101 101
102 } // namespace gfx 102 } // namespace gfx
OLDNEW
« no previous file with comments | « ui/gfx/canvas_unittest_mac.mm ('k') | ui/gfx/ios/NSString+CrStringDrawing_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698