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

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

Issue 144023016: Separate Custom Element resolution and upgrade/createdCallback. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 10 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 | Annotate | Revision Log
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 "core/dom/custom/CustomElementMicrotaskQueue.h"
9 #include "wtf/Noncopyable.h"
10 #include "wtf/PassOwnPtr.h"
11 #include "wtf/Vector.h"
12
13 namespace WebCore {
14
15 class CustomElementCallbackQueue;
16 class CustomElementMicrotaskStep;
17 class HTMLImport;
18
19 class CustomElementMicrotaskDispatcher {
20 WTF_MAKE_NONCOPYABLE(CustomElementMicrotaskDispatcher);
21 public:
22 CustomElementMicrotaskDispatcher() : m_phase(Quiescent) { }
23 ~CustomElementMicrotaskDispatcher() { }
24
25 void enqueue(HTMLImport*, PassOwnPtr<CustomElementMicrotaskStep>);
26 void enqueue(CustomElementCallbackQueue*);
27 bool dispatch();
28 bool elementQueueIsEmpty() { return m_elements.isEmpty(); }
29
30 private:
31 enum {
32 Quiescent,
33 Resolving,
34 DispatchingCallbacks
35 } m_phase;
36
37 CustomElementMicrotaskQueue m_resolutionAndImports;
38 Vector<CustomElementCallbackQueue*> m_elements;
39 };
40
41 }
42
43 #endif // CustomElementMicrotaskDispatcher_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698