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

Side by Side Diff: sky/engine/core/dom/custom/CustomElementMicrotaskDispatcher.h

Issue 950523002: Delete sky/engine/core/dom/custom (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 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
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 SKY_ENGINE_CORE_DOM_CUSTOM_CUSTOMELEMENTMICROTASKDISPATCHER_H_
6 #define SKY_ENGINE_CORE_DOM_CUSTOM_CUSTOMELEMENTMICROTASKDISPATCHER_H_
7
8 #include "sky/engine/platform/heap/Handle.h"
9 #include "sky/engine/wtf/Noncopyable.h"
10 #include "sky/engine/wtf/PassOwnPtr.h"
11 #include "sky/engine/wtf/Vector.h"
12
13 namespace blink {
14
15 class CustomElementCallbackQueue;
16 class CustomElementMicrotaskImportStep;
17 class CustomElementMicrotaskStep;
18 class Document;
19 class HTMLImportLoader;
20
21 class CustomElementMicrotaskDispatcher final {
22 WTF_MAKE_NONCOPYABLE(CustomElementMicrotaskDispatcher);
23 DECLARE_EMPTY_DESTRUCTOR_WILL_BE_REMOVED(CustomElementMicrotaskDispatcher);
24 public:
25 static CustomElementMicrotaskDispatcher& instance();
26
27 void enqueue(CustomElementCallbackQueue*);
28
29 bool elementQueueIsEmpty() { return m_elements.isEmpty(); }
30
31 private:
32 CustomElementMicrotaskDispatcher();
33
34 void ensureMicrotaskScheduledForElementQueue();
35 void ensureMicrotaskScheduled();
36
37 static void dispatch();
38 void doDispatch();
39
40 bool m_hasScheduledMicrotask;
41 enum {
42 Quiescent,
43 Resolving,
44 DispatchingCallbacks
45 } m_phase;
46
47 Vector<RawPtr<CustomElementCallbackQueue> > m_elements;
48 };
49
50 }
51
52 #endif // SKY_ENGINE_CORE_DOM_CUSTOM_CUSTOMELEMENTMICROTASKDISPATCHER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698