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 21 matching lines...) Expand all Loading... |
32 #ifndef FontCustomPlatformData_h | 32 #ifndef FontCustomPlatformData_h |
33 #define FontCustomPlatformData_h | 33 #define FontCustomPlatformData_h |
34 | 34 |
35 #include "platform/PlatformExport.h" | 35 #include "platform/PlatformExport.h" |
36 #include "platform/fonts/FontOrientation.h" | 36 #include "platform/fonts/FontOrientation.h" |
37 #include "wtf/Allocator.h" | 37 #include "wtf/Allocator.h" |
38 #include "wtf/Forward.h" | 38 #include "wtf/Forward.h" |
39 #include "wtf/Noncopyable.h" | 39 #include "wtf/Noncopyable.h" |
40 #include "wtf/RefPtr.h" | 40 #include "wtf/RefPtr.h" |
41 #include "wtf/text/WTFString.h" | 41 #include "wtf/text/WTFString.h" |
42 #include <memory> | |
43 | 42 |
44 class SkTypeface; | 43 class SkTypeface; |
45 | 44 |
46 namespace blink { | 45 namespace blink { |
47 | 46 |
48 class FontPlatformData; | 47 class FontPlatformData; |
49 class SharedBuffer; | 48 class SharedBuffer; |
50 | 49 |
51 class PLATFORM_EXPORT FontCustomPlatformData { | 50 class PLATFORM_EXPORT FontCustomPlatformData { |
52 USING_FAST_MALLOC(FontCustomPlatformData); | 51 USING_FAST_MALLOC(FontCustomPlatformData); |
53 WTF_MAKE_NONCOPYABLE(FontCustomPlatformData); | 52 WTF_MAKE_NONCOPYABLE(FontCustomPlatformData); |
54 public: | 53 public: |
55 static std::unique_ptr<FontCustomPlatformData> create(SharedBuffer*, String&
otsParseMessage); | 54 static PassOwnPtr<FontCustomPlatformData> create(SharedBuffer*, String& otsP
arseMessage); |
56 ~FontCustomPlatformData(); | 55 ~FontCustomPlatformData(); |
57 | 56 |
58 FontPlatformData fontPlatformData(float size, bool bold, bool italic, FontOr
ientation = FontOrientation::Horizontal); | 57 FontPlatformData fontPlatformData(float size, bool bold, bool italic, FontOr
ientation = FontOrientation::Horizontal); |
59 | 58 |
60 static bool supportsFormat(const String&); | 59 static bool supportsFormat(const String&); |
61 | 60 |
62 private: | 61 private: |
63 explicit FontCustomPlatformData(PassRefPtr<SkTypeface>); | 62 explicit FontCustomPlatformData(PassRefPtr<SkTypeface>); |
64 RefPtr<SkTypeface> m_typeface; | 63 RefPtr<SkTypeface> m_typeface; |
65 }; | 64 }; |
66 | 65 |
67 } // namespace blink | 66 } // namespace blink |
68 | 67 |
69 #endif // FontCustomPlatformData_h | 68 #endif // FontCustomPlatformData_h |
OLD | NEW |