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 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
103 | 103 |
104 class LoadFontCallback : public GarbageCollectedFinalized<LoadFontCallback>
{ | 104 class LoadFontCallback : public GarbageCollectedFinalized<LoadFontCallback>
{ |
105 public: | 105 public: |
106 virtual ~LoadFontCallback() { } | 106 virtual ~LoadFontCallback() { } |
107 virtual void notifyLoaded(FontFace*) = 0; | 107 virtual void notifyLoaded(FontFace*) = 0; |
108 virtual void notifyError(FontFace*) = 0; | 108 virtual void notifyError(FontFace*) = 0; |
109 DEFINE_INLINE_VIRTUAL_TRACE() { } | 109 DEFINE_INLINE_VIRTUAL_TRACE() { } |
110 }; | 110 }; |
111 void loadWithCallback(LoadFontCallback*, ExecutionContext*); | 111 void loadWithCallback(LoadFontCallback*, ExecutionContext*); |
112 | 112 |
113 // ActiveScriptWrappable. | 113 // ScriptWrappable: |
114 bool hasPendingActivity() const final; | 114 bool hasPendingActivity() const final; |
115 | 115 |
116 private: | 116 private: |
117 static FontFace* create(ExecutionContext*, const AtomicString& family, DOMAr
rayBuffer* source, const FontFaceDescriptors&); | 117 static FontFace* create(ExecutionContext*, const AtomicString& family, DOMAr
rayBuffer* source, const FontFaceDescriptors&); |
118 static FontFace* create(ExecutionContext*, const AtomicString& family, DOMAr
rayBufferView*, const FontFaceDescriptors&); | 118 static FontFace* create(ExecutionContext*, const AtomicString& family, DOMAr
rayBufferView*, const FontFaceDescriptors&); |
119 static FontFace* create(ExecutionContext*, const AtomicString& family, const
String& source, const FontFaceDescriptors&); | 119 static FontFace* create(ExecutionContext*, const AtomicString& family, const
String& source, const FontFaceDescriptors&); |
120 | 120 |
121 explicit FontFace(ExecutionContext*); | 121 explicit FontFace(ExecutionContext*); |
122 FontFace(ExecutionContext*, const AtomicString& family, const FontFaceDescri
ptors&); | 122 FontFace(ExecutionContext*, const AtomicString& family, const FontFaceDescri
ptors&); |
123 | 123 |
(...skipping 23 matching lines...) Expand all Loading... |
147 Member<LoadedProperty> m_loadedProperty; | 147 Member<LoadedProperty> m_loadedProperty; |
148 Member<CSSFontFace> m_cssFontFace; | 148 Member<CSSFontFace> m_cssFontFace; |
149 HeapVector<Member<LoadFontCallback>> m_callbacks; | 149 HeapVector<Member<LoadFontCallback>> m_callbacks; |
150 }; | 150 }; |
151 | 151 |
152 using FontFaceArray = HeapVector<Member<FontFace>>; | 152 using FontFaceArray = HeapVector<Member<FontFace>>; |
153 | 153 |
154 } // namespace blink | 154 } // namespace blink |
155 | 155 |
156 #endif // FontFace_h | 156 #endif // FontFace_h |
OLD | NEW |