| Index: content/browser/renderer_host/pepper/pepper_truetype_font_list_mac.mm
|
| diff --git a/content/browser/renderer_host/pepper/pepper_truetype_font_list_mac.mm b/content/browser/renderer_host/pepper/pepper_truetype_font_list_mac.mm
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..3fc20652f15b40bc1a68b13fc9a49840eee6e344
|
| --- /dev/null
|
| +++ b/content/browser/renderer_host/pepper/pepper_truetype_font_list_mac.mm
|
| @@ -0,0 +1,25 @@
|
| +// Copyright (c) 2013 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#include "content/browser/renderer_host/pepper/pepper_truetype_font_list.h"
|
| +
|
| +#import <Cocoa/Cocoa.h>
|
| +
|
| +#include "base/mac/scoped_nsautorelease_pool.h"
|
| +#include "base/sys_string_conversions.h"
|
| +
|
| +namespace content {
|
| +
|
| +std::vector<std::string> GetFontFamilies_SlowBlocking() {
|
| + base::mac::ScopedNSAutoreleasePool autorelease_pool;
|
| + std::vector<std::string> font_families;
|
| + NSFontManager* fontManager = [[[NSFontManager alloc] init] autorelease];
|
| + NSArray* fonts = [fontManager availableFontFamilies];
|
| + for (NSString* family_name in fonts)
|
| + font_families.push_back(base::SysNSStringToUTF8(family_name));
|
| +
|
| + return font_families;
|
| +}
|
| +
|
| +} // namespace content
|
|
|