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

Side by Side Diff: chrome/common/font_loader_mac.mm

Issue 3855001: Move scoped_cftyperef from base to base/mac, use the new namespace, and name ... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 10 years, 2 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 | Annotate | Revision Log
Property Changes:
Added: svn:eol-style
+ LF
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/font_loader_mac.h" 5 #include "chrome/common/font_loader_mac.h"
6 6
7 #import <Cocoa/Cocoa.h> 7 #import <Cocoa/Cocoa.h>
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/file_path.h" 10 #include "base/file_path.h"
11 #include "base/file_util.h" 11 #include "base/file_util.h"
12 #include "base/logging.h" 12 #include "base/logging.h"
13 #include "base/mac_util.h" 13 #include "base/mac_util.h"
14 #include "base/scoped_cftyperef.h"
15 #include "base/sys_string_conversions.h" 14 #include "base/sys_string_conversions.h"
16 15
17 // static 16 // static
18 bool FontLoader::LoadFontIntoBuffer(NSFont* font_to_encode, 17 bool FontLoader::LoadFontIntoBuffer(NSFont* font_to_encode,
19 base::SharedMemory* font_data, 18 base::SharedMemory* font_data,
20 uint32* font_data_size) { 19 uint32* font_data_size) {
21 CHECK(font_data && font_data_size); 20 CHECK(font_data && font_data_size);
22 *font_data_size = 0; 21 *font_data_size = 0;
23 22
24 // Used only for logging. 23 // Used only for logging.
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 // This is the value used by WebKit when activating remote fonts. 106 // This is the value used by WebKit when activating remote fonts.
108 const ATSFontContext kFontContextPrivate = 3; 107 const ATSFontContext kFontContextPrivate = 3;
109 OSStatus err = ATSFontActivateFromMemory(shm.memory(), font_data_size, 108 OSStatus err = ATSFontActivateFromMemory(shm.memory(), font_data_size,
110 kFontContextPrivate, kATSFontFormatUnspecified, NULL, 109 kFontContextPrivate, kATSFontFormatUnspecified, NULL,
111 kATSOptionFlagsDefault, font_container); 110 kATSOptionFlagsDefault, font_container);
112 if (err != noErr || !font_container) 111 if (err != noErr || !font_container)
113 return false; 112 return false;
114 113
115 return true; 114 return true;
116 } 115 }
OLDNEW
« no previous file with comments | « chrome/browser/search_engines/template_url_prepopulate_data.cc ('k') | chrome/common/mach_message_source_mac.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698