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

Side by Side Diff: third_party/WebKit/Source/platform/fonts/FontCache.h

Issue 2050123002: Remove OwnPtr from Blink. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: First attempt to land. Created 4 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2008 Apple Computer, Inc. All rights reserved. 2 * Copyright (C) 2006, 2008 Apple Computer, Inc. All rights reserved.
3 * Copyright (C) 2007-2008 Torch Mobile, Inc. 3 * Copyright (C) 2007-2008 Torch Mobile, Inc.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 8 *
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 26 matching lines...) Expand all
37 #include "platform/fonts/FontFallbackPriority.h" 37 #include "platform/fonts/FontFallbackPriority.h"
38 #include "wtf/Allocator.h" 38 #include "wtf/Allocator.h"
39 #include "wtf/Forward.h" 39 #include "wtf/Forward.h"
40 #include "wtf/HashMap.h" 40 #include "wtf/HashMap.h"
41 #include "wtf/PassRefPtr.h" 41 #include "wtf/PassRefPtr.h"
42 #include "wtf/RefPtr.h" 42 #include "wtf/RefPtr.h"
43 #include "wtf/text/CString.h" 43 #include "wtf/text/CString.h"
44 #include "wtf/text/Unicode.h" 44 #include "wtf/text/Unicode.h"
45 #include "wtf/text/WTFString.h" 45 #include "wtf/text/WTFString.h"
46 #include <limits.h> 46 #include <limits.h>
47 #include <memory>
47 48
48 #include "SkFontMgr.h" 49 #include "SkFontMgr.h"
49 50
50 class SkTypeface; 51 class SkTypeface;
51 52
52 namespace base { 53 namespace base {
53 namespace trace_event { 54 namespace trace_event {
54 class ProcessMemoryDump; 55 class ProcessMemoryDump;
55 } 56 }
56 } 57 }
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 { 166 {
166 ASSERT(m_purgePreventCount); 167 ASSERT(m_purgePreventCount);
167 if (!--m_purgePreventCount) 168 if (!--m_purgePreventCount)
168 purge(PurgeIfNeeded); 169 purge(PurgeIfNeeded);
169 } 170 }
170 171
171 // FIXME: This method should eventually be removed. 172 // FIXME: This method should eventually be removed.
172 FontPlatformData* getFontPlatformData(const FontDescription&, const FontFace CreationParams&, bool checkingAlternateName = false); 173 FontPlatformData* getFontPlatformData(const FontDescription&, const FontFace CreationParams&, bool checkingAlternateName = false);
173 174
174 // These methods are implemented by each platform. 175 // These methods are implemented by each platform.
175 PassOwnPtr<FontPlatformData> createFontPlatformData(const FontDescription&, const FontFaceCreationParams&, float fontSize); 176 std::unique_ptr<FontPlatformData> createFontPlatformData(const FontDescripti on&, const FontFaceCreationParams&, float fontSize);
176 PassOwnPtr<FontPlatformData> scaleFontPlatformData(const FontPlatformData&, const FontDescription&, const FontFaceCreationParams&, float fontSize); 177 std::unique_ptr<FontPlatformData> scaleFontPlatformData(const FontPlatformDa ta&, const FontDescription&, const FontFaceCreationParams&, float fontSize);
177 178
178 // Implemented on skia platforms. 179 // Implemented on skia platforms.
179 PassRefPtr<SkTypeface> createTypeface(const FontDescription&, const FontFace CreationParams&, CString& name); 180 PassRefPtr<SkTypeface> createTypeface(const FontDescription&, const FontFace CreationParams&, CString& name);
180 181
181 #if OS(ANDROID) || OS(LINUX) 182 #if OS(ANDROID) || OS(LINUX)
182 static AtomicString getFamilyNameForCharacter(SkFontMgr*, UChar32, const Fon tDescription&, FontFallbackPriority); 183 static AtomicString getFamilyNameForCharacter(SkFontMgr*, UChar32, const Fon tDescription&, FontFallbackPriority);
183 #endif 184 #endif
184 185
185 PassRefPtr<SimpleFontData> fallbackOnStandardFontStyle(const FontDescription &, UChar32); 186 PassRefPtr<SimpleFontData> fallbackOnStandardFontStyle(const FontDescription &, UChar32);
186 187
(...skipping 29 matching lines...) Expand all
216 public: 217 public:
217 FontCachePurgePreventer() { FontCache::fontCache()->disablePurging(); } 218 FontCachePurgePreventer() { FontCache::fontCache()->disablePurging(); }
218 ~FontCachePurgePreventer() { FontCache::fontCache()->enablePurging(); } 219 ~FontCachePurgePreventer() { FontCache::fontCache()->enablePurging(); }
219 }; 220 };
220 221
221 CString toSkFontMgrLocale(const String& locale); 222 CString toSkFontMgrLocale(const String& locale);
222 223
223 } // namespace blink 224 } // namespace blink
224 225
225 #endif 226 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/exported/WebURLResponse.cpp ('k') | third_party/WebKit/Source/platform/fonts/FontCache.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698