Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(21)

Side by Side Diff: third_party/WebKit/Source/core/css/FontFaceSet.h

Issue 2567913002: Rename ActiveDOMObject to SuspendableObject (Closed)
Patch Set: Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 met: 5 * modification, are permitted provided that the following conditions are met:
6 * 6 *
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 11 matching lines...) Expand all
22 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH 22 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
23 * DAMAGE. 23 * DAMAGE.
24 */ 24 */
25 25
26 #ifndef FontFaceSet_h 26 #ifndef FontFaceSet_h
27 #define FontFaceSet_h 27 #define FontFaceSet_h
28 28
29 #include "bindings/core/v8/Iterable.h" 29 #include "bindings/core/v8/Iterable.h"
30 #include "bindings/core/v8/ScriptPromise.h" 30 #include "bindings/core/v8/ScriptPromise.h"
31 #include "core/css/FontFace.h" 31 #include "core/css/FontFace.h"
32 #include "core/dom/ActiveDOMObject.h"
33 #include "core/dom/Document.h" 32 #include "core/dom/Document.h"
33 #include "core/dom/SuspendableObject.h"
34 #include "core/events/EventListener.h" 34 #include "core/events/EventListener.h"
35 #include "core/events/EventTarget.h" 35 #include "core/events/EventTarget.h"
36 #include "platform/AsyncMethodRunner.h" 36 #include "platform/AsyncMethodRunner.h"
37 #include "platform/heap/Handle.h" 37 #include "platform/heap/Handle.h"
38 #include "wtf/Allocator.h" 38 #include "wtf/Allocator.h"
39 #include "wtf/Vector.h" 39 #include "wtf/Vector.h"
40 40
41 // Mac OS X 10.6 SDK defines check() macro that interferes with our check() 41 // Mac OS X 10.6 SDK defines check() macro that interferes with our check()
42 // method 42 // method
43 #ifdef check 43 #ifdef check
44 #undef check 44 #undef check
45 #endif 45 #endif
46 46
47 namespace blink { 47 namespace blink {
48 48
49 class CSSFontSelector; 49 class CSSFontSelector;
50 class ExceptionState; 50 class ExceptionState;
51 class Font; 51 class Font;
52 class FontFaceCache; 52 class FontFaceCache;
53 class ExecutionContext; 53 class ExecutionContext;
54 54
55 using FontFaceSetIterable = PairIterable<Member<FontFace>, Member<FontFace>>; 55 using FontFaceSetIterable = PairIterable<Member<FontFace>, Member<FontFace>>;
56 56
57 class FontFaceSet final : public EventTargetWithInlineData, 57 class FontFaceSet final : public EventTargetWithInlineData,
58 public Supplement<Document>, 58 public Supplement<Document>,
59 public ActiveDOMObject, 59 public SuspendableObject,
60 public FontFaceSetIterable, 60 public FontFaceSetIterable,
61 public FontFace::LoadFontCallback { 61 public FontFace::LoadFontCallback {
62 USING_GARBAGE_COLLECTED_MIXIN(FontFaceSet); 62 USING_GARBAGE_COLLECTED_MIXIN(FontFaceSet);
63 DEFINE_WRAPPERTYPEINFO(); 63 DEFINE_WRAPPERTYPEINFO();
64 WTF_MAKE_NONCOPYABLE(FontFaceSet); 64 WTF_MAKE_NONCOPYABLE(FontFaceSet);
65 65
66 public: 66 public:
67 ~FontFaceSet() override; 67 ~FontFaceSet() override;
68 68
69 DEFINE_ATTRIBUTE_EVENT_LISTENER(loading); 69 DEFINE_ATTRIBUTE_EVENT_LISTENER(loading);
(...skipping 19 matching lines...) Expand all
89 89
90 void didLayout(); 90 void didLayout();
91 void beginFontLoading(FontFace*); 91 void beginFontLoading(FontFace*);
92 92
93 // FontFace::LoadFontCallback 93 // FontFace::LoadFontCallback
94 void notifyLoaded(FontFace*) override; 94 void notifyLoaded(FontFace*) override;
95 void notifyError(FontFace*) override; 95 void notifyError(FontFace*) override;
96 96
97 size_t approximateBlankCharacterCount() const; 97 size_t approximateBlankCharacterCount() const;
98 98
99 // ActiveDOMObject 99 // SuspendableObject
100 void suspend() override; 100 void suspend() override;
101 void resume() override; 101 void resume() override;
102 void contextDestroyed() override; 102 void contextDestroyed() override;
103 103
104 static FontFaceSet* from(Document&); 104 static FontFaceSet* from(Document&);
105 static void didLayout(Document&); 105 static void didLayout(Document&);
106 static size_t approximateBlankCharacterCount(Document&); 106 static size_t approximateBlankCharacterCount(Document&);
107 107
108 static const char* supplementName() { return "FontFaceSet"; } 108 static const char* supplementName() { return "FontFaceSet"; }
109 109
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 HeapListHashSet<Member<FontFace>> m_nonCSSConnectedFaces; 182 HeapListHashSet<Member<FontFace>> m_nonCSSConnectedFaces;
183 183
184 Member<AsyncMethodRunner<FontFaceSet>> m_asyncRunner; 184 Member<AsyncMethodRunner<FontFaceSet>> m_asyncRunner;
185 185
186 FontLoadHistogram m_histogram; 186 FontLoadHistogram m_histogram;
187 }; 187 };
188 188
189 } // namespace blink 189 } // namespace blink
190 190
191 #endif // FontFaceSet_h 191 #endif // FontFaceSet_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698