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

Side by Side Diff: third_party/WebKit/Source/core/dom/custom/CustomElementMicrotaskDispatcher.h

Issue 1914923002: Rename all existing custom element classes as V0 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: CustomElementV0 -> V0CustomElement Created 4 years, 7 months 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
(Empty)
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CustomElementMicrotaskDispatcher_h
6 #define CustomElementMicrotaskDispatcher_h
7
8 #include "platform/heap/Handle.h"
9 #include "wtf/Noncopyable.h"
10 #include "wtf/Vector.h"
11
12 namespace blink {
13
14 class CustomElementCallbackQueue;
15
16 class CustomElementMicrotaskDispatcher final : public GarbageCollected<CustomEle mentMicrotaskDispatcher> {
17 WTF_MAKE_NONCOPYABLE(CustomElementMicrotaskDispatcher);
18 public:
19 static CustomElementMicrotaskDispatcher& instance();
20
21 void enqueue(CustomElementCallbackQueue*);
22
23 bool elementQueueIsEmpty() { return m_elements.isEmpty(); }
24
25 DECLARE_TRACE();
26
27 private:
28 CustomElementMicrotaskDispatcher();
29
30 void ensureMicrotaskScheduledForElementQueue();
31 void ensureMicrotaskScheduled();
32
33 static void dispatch();
34 void doDispatch();
35
36 bool m_hasScheduledMicrotask;
37 enum {
38 Quiescent,
39 Resolving,
40 DispatchingCallbacks
41 } m_phase;
42
43 HeapVector<Member<CustomElementCallbackQueue>> m_elements;
44 };
45
46 } // namespace blink
47
48 #endif // CustomElementMicrotaskDispatcher_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698