OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
115 | 115 |
116 bool hadBlankText() const; | 116 bool hadBlankText() const; |
117 | 117 |
118 class LoadFontCallback : public GarbageCollectedMixin { | 118 class LoadFontCallback : public GarbageCollectedMixin { |
119 public: | 119 public: |
120 virtual ~LoadFontCallback() {} | 120 virtual ~LoadFontCallback() {} |
121 virtual void notifyLoaded(FontFace*) = 0; | 121 virtual void notifyLoaded(FontFace*) = 0; |
122 virtual void notifyError(FontFace*) = 0; | 122 virtual void notifyError(FontFace*) = 0; |
123 DEFINE_INLINE_VIRTUAL_TRACE() {} | 123 DEFINE_INLINE_VIRTUAL_TRACE() {} |
124 }; | 124 }; |
125 void loadWithCallback(LoadFontCallback*); | 125 void loadWithCallback(Document*, LoadFontCallback*); |
126 void addCallback(LoadFontCallback*); | 126 void addCallback(LoadFontCallback*); |
127 | 127 |
128 // ScriptWrappable: | 128 // ScriptWrappable: |
129 bool hasPendingActivity() const final; | 129 bool hasPendingActivity() const final; |
130 | 130 |
131 private: | 131 private: |
132 static FontFace* create(ExecutionContext*, | 132 static FontFace* create(ExecutionContext*, |
133 const AtomicString& family, | 133 const AtomicString& family, |
134 DOMArrayBuffer* source, | 134 DOMArrayBuffer* source, |
135 const FontFaceDescriptors&); | 135 const FontFaceDescriptors&); |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
179 Member<LoadedProperty> m_loadedProperty; | 179 Member<LoadedProperty> m_loadedProperty; |
180 Member<CSSFontFace> m_cssFontFace; | 180 Member<CSSFontFace> m_cssFontFace; |
181 HeapVector<Member<LoadFontCallback>> m_callbacks; | 181 HeapVector<Member<LoadFontCallback>> m_callbacks; |
182 }; | 182 }; |
183 | 183 |
184 using FontFaceArray = HeapVector<Member<FontFace>>; | 184 using FontFaceArray = HeapVector<Member<FontFace>>; |
185 | 185 |
186 } // namespace blink | 186 } // namespace blink |
187 | 187 |
188 #endif // FontFace_h | 188 #endif // FontFace_h |
OLD | NEW |