| OLD | NEW |
| 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 30 matching lines...) Expand all Loading... |
| 41 #include "wtf/text/WTFString.h" | 41 #include "wtf/text/WTFString.h" |
| 42 | 42 |
| 43 #if OS(MACOSX) | 43 #if OS(MACOSX) |
| 44 #include "wtf/RetainPtr.h" | 44 #include "wtf/RetainPtr.h" |
| 45 #include <CoreFoundation/CFBase.h> | 45 #include <CoreFoundation/CFBase.h> |
| 46 typedef struct CGFont* CGFontRef; | 46 typedef struct CGFont* CGFontRef; |
| 47 #endif | 47 #endif |
| 48 | 48 |
| 49 class SkTypeface; | 49 class SkTypeface; |
| 50 | 50 |
| 51 namespace WebCore { | 51 namespace blink { |
| 52 | 52 |
| 53 class FontPlatformData; | 53 class FontPlatformData; |
| 54 class SharedBuffer; | 54 class SharedBuffer; |
| 55 | 55 |
| 56 class PLATFORM_EXPORT FontCustomPlatformData { | 56 class PLATFORM_EXPORT FontCustomPlatformData { |
| 57 WTF_MAKE_NONCOPYABLE(FontCustomPlatformData); | 57 WTF_MAKE_NONCOPYABLE(FontCustomPlatformData); |
| 58 public: | 58 public: |
| 59 static PassOwnPtr<FontCustomPlatformData> create(SharedBuffer*); | 59 static PassOwnPtr<FontCustomPlatformData> create(SharedBuffer*); |
| 60 ~FontCustomPlatformData(); | 60 ~FontCustomPlatformData(); |
| 61 | 61 |
| 62 FontPlatformData fontPlatformData(float size, bool bold, bool italic, FontOr
ientation = Horizontal, FontWidthVariant = RegularWidth); | 62 FontPlatformData fontPlatformData(float size, bool bold, bool italic, FontOr
ientation = Horizontal, FontWidthVariant = RegularWidth); |
| 63 | 63 |
| 64 static bool supportsFormat(const String&); | 64 static bool supportsFormat(const String&); |
| 65 | 65 |
| 66 private: | 66 private: |
| 67 #if OS(MACOSX) | 67 #if OS(MACOSX) |
| 68 explicit FontCustomPlatformData(CGFontRef, PassRefPtr<SkTypeface>); | 68 explicit FontCustomPlatformData(CGFontRef, PassRefPtr<SkTypeface>); |
| 69 RetainPtr<CGFontRef> m_cgFont; | 69 RetainPtr<CGFontRef> m_cgFont; |
| 70 #else | 70 #else |
| 71 explicit FontCustomPlatformData(PassRefPtr<SkTypeface>); | 71 explicit FontCustomPlatformData(PassRefPtr<SkTypeface>); |
| 72 #endif | 72 #endif |
| 73 RefPtr<SkTypeface> m_typeface; | 73 RefPtr<SkTypeface> m_typeface; |
| 74 }; | 74 }; |
| 75 | 75 |
| 76 } // namespace WebCore | 76 } // namespace blink |
| 77 | 77 |
| 78 #endif // FontCustomPlatformData_h | 78 #endif // FontCustomPlatformData_h |
| OLD | NEW |