| 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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 class DOMArrayBuffer; | 49 class DOMArrayBuffer; |
| 50 class DOMArrayBufferView; | 50 class DOMArrayBufferView; |
| 51 class Document; | 51 class Document; |
| 52 class ExceptionState; | 52 class ExceptionState; |
| 53 class FontFaceDescriptors; | 53 class FontFaceDescriptors; |
| 54 class StringOrArrayBufferOrArrayBufferView; | 54 class StringOrArrayBufferOrArrayBufferView; |
| 55 class StylePropertySet; | 55 class StylePropertySet; |
| 56 class StyleRuleFontFace; | 56 class StyleRuleFontFace; |
| 57 class WebTaskRunner; | 57 class WebTaskRunner; |
| 58 | 58 |
| 59 class FontFace : public GarbageCollectedFinalized<FontFace>, | 59 class CORE_EXPORT FontFace : public GarbageCollectedFinalized<FontFace>, |
| 60 public ScriptWrappable, | 60 public ScriptWrappable, |
| 61 public ActiveScriptWrappable<FontFace>, | 61 public ActiveScriptWrappable<FontFace>, |
| 62 public ContextLifecycleObserver { | 62 public ContextLifecycleObserver { |
| 63 DEFINE_WRAPPERTYPEINFO(); | 63 DEFINE_WRAPPERTYPEINFO(); |
| 64 USING_GARBAGE_COLLECTED_MIXIN(FontFace); | 64 USING_GARBAGE_COLLECTED_MIXIN(FontFace); |
| 65 WTF_MAKE_NONCOPYABLE(FontFace); | 65 WTF_MAKE_NONCOPYABLE(FontFace); |
| 66 | 66 |
| 67 public: | 67 public: |
| 68 enum LoadStatusType { Unloaded, Loading, Loaded, Error }; | 68 enum LoadStatusType { Unloaded, Loading, Loaded, Error }; |
| 69 | 69 |
| 70 static FontFace* create(ExecutionContext*, | 70 static FontFace* create(ExecutionContext*, |
| 71 const AtomicString& family, | 71 const AtomicString& family, |
| 72 StringOrArrayBufferOrArrayBufferView&, | 72 StringOrArrayBufferOrArrayBufferView&, |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 108 void setError(DOMException* = nullptr); | 108 void setError(DOMException* = nullptr); |
| 109 DOMException* error() const { return m_error; } | 109 DOMException* error() const { return m_error; } |
| 110 FontTraits traits() const; | 110 FontTraits traits() const; |
| 111 CSSFontFace* cssFontFace() { return m_cssFontFace.get(); } | 111 CSSFontFace* cssFontFace() { return m_cssFontFace.get(); } |
| 112 size_t approximateBlankCharacterCount() const; | 112 size_t approximateBlankCharacterCount() const; |
| 113 | 113 |
| 114 DECLARE_VIRTUAL_TRACE(); | 114 DECLARE_VIRTUAL_TRACE(); |
| 115 | 115 |
| 116 bool hadBlankText() const; | 116 bool hadBlankText() const; |
| 117 | 117 |
| 118 class LoadFontCallback : public GarbageCollectedMixin { | 118 class CORE_EXPORT 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(LoadFontCallback*); |
| 126 void addCallback(LoadFontCallback*); | 126 void addCallback(LoadFontCallback*); |
| 127 | 127 |
| 128 // ScriptWrappable: | 128 // ScriptWrappable: |
| (...skipping 50 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 |