| 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 16 matching lines...) Expand all Loading... |
| 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 29 */ | 29 */ |
| 30 | 30 |
| 31 #ifndef FontFace_h | 31 #ifndef FontFace_h |
| 32 #define FontFace_h | 32 #define FontFace_h |
| 33 | 33 |
| 34 #include "bindings/core/v8/ScriptPromise.h" | 34 #include "bindings/core/v8/ScriptPromise.h" |
| 35 #include "bindings/core/v8/ScriptPromiseProperty.h" | 35 #include "bindings/core/v8/ScriptPromiseProperty.h" |
| 36 #include "bindings/core/v8/ScriptWrappable.h" | 36 #include "bindings/core/v8/ScriptWrappable.h" |
| 37 #include "bindings/core/v8/V8GCRoot.h" |
| 37 #include "core/CSSPropertyNames.h" | 38 #include "core/CSSPropertyNames.h" |
| 38 #include "core/css/CSSValue.h" | 39 #include "core/css/CSSValue.h" |
| 39 #include "core/dom/ActiveDOMObject.h" | 40 #include "core/dom/ActiveDOMObject.h" |
| 40 #include "core/dom/DOMException.h" | 41 #include "core/dom/DOMException.h" |
| 41 #include "platform/fonts/FontTraits.h" | 42 #include "platform/fonts/FontTraits.h" |
| 42 #include "wtf/PassRefPtr.h" | 43 #include "wtf/PassRefPtr.h" |
| 43 #include "wtf/RefCounted.h" | 44 #include "wtf/RefCounted.h" |
| 44 #include "wtf/text/WTFString.h" | 45 #include "wtf/text/WTFString.h" |
| 45 | 46 |
| 46 namespace blink { | 47 namespace blink { |
| 47 | 48 |
| 48 class CSSFontFace; | 49 class CSSFontFace; |
| 49 class CSSValue; | 50 class CSSValue; |
| 50 class DOMArrayBuffer; | 51 class DOMArrayBuffer; |
| 51 class DOMArrayBufferView; | 52 class DOMArrayBufferView; |
| 52 class Document; | 53 class Document; |
| 53 class ExceptionState; | 54 class ExceptionState; |
| 54 class FontFaceDescriptors; | 55 class FontFaceDescriptors; |
| 55 class StringOrArrayBufferOrArrayBufferView; | 56 class StringOrArrayBufferOrArrayBufferView; |
| 56 class StylePropertySet; | 57 class StylePropertySet; |
| 57 class StyleRuleFontFace; | 58 class StyleRuleFontFace; |
| 58 | 59 |
| 59 class FontFace : public RefCountedWillBeGarbageCollectedFinalized<FontFace>, pub
lic ScriptWrappable, public ActiveDOMObject { | 60 class FontFace : public RefCountedWillBeGarbageCollectedFinalized<FontFace>, pub
lic ScriptWrappable, public ActiveDOMObject, public V8GCRoot { |
| 60 DEFINE_WRAPPERTYPEINFO(); | 61 DEFINE_WRAPPERTYPEINFO(); |
| 61 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(FontFace); | 62 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(FontFace); |
| 62 public: | 63 public: |
| 63 enum LoadStatusType { Unloaded, Loading, Loaded, Error }; | 64 enum LoadStatusType { Unloaded, Loading, Loaded, Error }; |
| 64 | 65 |
| 65 static PassRefPtrWillBeRawPtr<FontFace> create(ExecutionContext*, const Atom
icString& family, StringOrArrayBufferOrArrayBufferView&, const FontFaceDescripto
rs&); | 66 static PassRefPtrWillBeRawPtr<FontFace> create(ExecutionContext*, const Atom
icString& family, StringOrArrayBufferOrArrayBufferView&, const FontFaceDescripto
rs&); |
| 66 static PassRefPtrWillBeRawPtr<FontFace> create(Document*, const StyleRuleFon
tFace*); | 67 static PassRefPtrWillBeRawPtr<FontFace> create(Document*, const StyleRuleFon
tFace*); |
| 67 | 68 |
| 68 ~FontFace(); | 69 ~FontFace(); |
| 69 | 70 |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 146 PersistentWillBeMember<LoadedProperty> m_loadedProperty; | 147 PersistentWillBeMember<LoadedProperty> m_loadedProperty; |
| 147 OwnPtrWillBeMember<CSSFontFace> m_cssFontFace; | 148 OwnPtrWillBeMember<CSSFontFace> m_cssFontFace; |
| 148 WillBeHeapVector<RefPtrWillBeMember<LoadFontCallback>> m_callbacks; | 149 WillBeHeapVector<RefPtrWillBeMember<LoadFontCallback>> m_callbacks; |
| 149 }; | 150 }; |
| 150 | 151 |
| 151 using FontFaceArray = WillBeHeapVector<RefPtrWillBeMember<FontFace>>; | 152 using FontFaceArray = WillBeHeapVector<RefPtrWillBeMember<FontFace>>; |
| 152 | 153 |
| 153 } // namespace blink | 154 } // namespace blink |
| 154 | 155 |
| 155 #endif // FontFace_h | 156 #endif // FontFace_h |
| OLD | NEW |