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

Side by Side Diff: Source/core/platform/graphics/FontCustomPlatformData.h

Issue 14107015: Rename OS(DARWIN) to OS(MACOSX). (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase Created 7 years, 3 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) 2007 Apple Computer, Inc. 2 * Copyright (C) 2007 Apple Computer, Inc.
3 * Copyright (c) 2007, 2008, 2009, Google Inc. All rights reserved. 3 * Copyright (c) 2007, 2008, 2009, Google Inc. All rights reserved.
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 are 6 * modification, are permitted provided that the following conditions are
7 * met: 7 * met:
8 * 8 *
9 * * Redistributions of source code must retain the above copyright 9 * * 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 24 matching lines...) Expand all
35 #include "core/platform/graphics/FontOrientation.h" 35 #include "core/platform/graphics/FontOrientation.h"
36 #include "core/platform/graphics/FontWidthVariant.h" 36 #include "core/platform/graphics/FontWidthVariant.h"
37 #include "wtf/Forward.h" 37 #include "wtf/Forward.h"
38 #include "wtf/Noncopyable.h" 38 #include "wtf/Noncopyable.h"
39 #include "wtf/text/WTFString.h" 39 #include "wtf/text/WTFString.h"
40 40
41 #if OS(WINDOWS) && ENABLE(GDI_FONTS_ON_WINDOWS) 41 #if OS(WINDOWS) && ENABLE(GDI_FONTS_ON_WINDOWS)
42 #include <windows.h> 42 #include <windows.h>
43 #endif 43 #endif
44 44
45 #if OS(DARWIN) 45 #if OS(MACOSX)
46 #include "wtf/RetainPtr.h" 46 #include "wtf/RetainPtr.h"
47 #include <CoreFoundation/CFBase.h> 47 #include <CoreFoundation/CFBase.h>
48 typedef struct CGFont* CGFontRef; 48 typedef struct CGFont* CGFontRef;
49 #endif 49 #endif
50 50
51 #if OS(DARWIN) || OS(UNIX) || (OS(WINDOWS) && !ENABLE(GDI_FONTS_ON_WINDOWS)) 51 #if OS(MACOSX) || OS(UNIX) || (OS(WINDOWS) && !ENABLE(GDI_FONTS_ON_WINDOWS))
52 #include "wtf/RefPtr.h" 52 #include "wtf/RefPtr.h"
53 class SkTypeface; 53 class SkTypeface;
54 #endif 54 #endif
55 55
56 namespace WebCore { 56 namespace WebCore {
57 57
58 class FontPlatformData; 58 class FontPlatformData;
59 class SharedBuffer; 59 class SharedBuffer;
60 60
61 class FontCustomPlatformData { 61 class FontCustomPlatformData {
62 WTF_MAKE_NONCOPYABLE(FontCustomPlatformData); 62 WTF_MAKE_NONCOPYABLE(FontCustomPlatformData);
63 public: 63 public:
64 static PassOwnPtr<FontCustomPlatformData> create(SharedBuffer*); 64 static PassOwnPtr<FontCustomPlatformData> create(SharedBuffer*);
65 ~FontCustomPlatformData(); 65 ~FontCustomPlatformData();
66 66
67 FontPlatformData fontPlatformData(int size, bool bold, bool italic, FontOrie ntation = Horizontal, FontWidthVariant = RegularWidth); 67 FontPlatformData fontPlatformData(int size, bool bold, bool italic, FontOrie ntation = Horizontal, FontWidthVariant = RegularWidth);
68 68
69 static bool supportsFormat(const String&); 69 static bool supportsFormat(const String&);
70 70
71 private: 71 private:
72 #if OS(WINDOWS) && ENABLE(GDI_FONTS_ON_WINDOWS) 72 #if OS(WINDOWS) && ENABLE(GDI_FONTS_ON_WINDOWS)
73 FontCustomPlatformData(HANDLE fontReference, const String& name); 73 FontCustomPlatformData(HANDLE fontReference, const String& name);
74 HANDLE m_fontReference; 74 HANDLE m_fontReference;
75 String m_name; 75 String m_name;
76 #elif OS(DARWIN) 76 #elif OS(MACOSX)
77 explicit FontCustomPlatformData(CGFontRef, PassRefPtr<SkTypeface>); 77 explicit FontCustomPlatformData(CGFontRef, PassRefPtr<SkTypeface>);
78 RetainPtr<CGFontRef> m_cgFont; 78 RetainPtr<CGFontRef> m_cgFont;
79 RefPtr<SkTypeface> m_typeface; 79 RefPtr<SkTypeface> m_typeface;
80 #elif OS(UNIX) || (OS(WINDOWS) && !ENABLE(GDI_FONTS_ON_WINDOWS)) 80 #elif OS(UNIX) || (OS(WINDOWS) && !ENABLE(GDI_FONTS_ON_WINDOWS))
81 explicit FontCustomPlatformData(PassRefPtr<SkTypeface>); 81 explicit FontCustomPlatformData(PassRefPtr<SkTypeface>);
82 RefPtr<SkTypeface> m_typeface; 82 RefPtr<SkTypeface> m_typeface;
83 #endif 83 #endif
84 }; 84 };
85 85
86 } // namespace WebCore 86 } // namespace WebCore
87 87
88 #endif // FontCustomPlatformData_h 88 #endif // FontCustomPlatformData_h
OLDNEW
« no previous file with comments | « Source/core/platform/graphics/FontCache.h ('k') | Source/core/platform/graphics/FontDescription.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698