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

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

Issue 334253005: Custom Elements: Encapsulates Async and Sync Queues into one class. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Updated Created 6 years, 6 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
1 // Copyright 2014 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CustomElementMicrotaskDispatcher_h 5 #ifndef CustomElementMicrotaskDispatcher_h
6 #define CustomElementMicrotaskDispatcher_h 6 #define CustomElementMicrotaskDispatcher_h
7 7
8 #include "platform/heap/Handle.h" 8 #include "platform/heap/Handle.h"
9 #include "wtf/Noncopyable.h" 9 #include "wtf/Noncopyable.h"
10 #include "wtf/PassOwnPtr.h" 10 #include "wtf/PassOwnPtr.h"
11 #include "wtf/Vector.h" 11 #include "wtf/Vector.h"
12 12
13 namespace WebCore { 13 namespace WebCore {
14 14
15 class CustomElementAsyncImportMicrotaskQueue;
16 class CustomElementCallbackQueue; 15 class CustomElementCallbackQueue;
17 class CustomElementMicrotaskImportStep; 16 class CustomElementMicrotaskImportStep;
18 class CustomElementMicrotaskQueue;
19 class CustomElementMicrotaskStep; 17 class CustomElementMicrotaskStep;
18 class CustomElementMicrotaskStepDispatcher;
20 class HTMLImportLoader; 19 class HTMLImportLoader;
21 20
22 class CustomElementMicrotaskDispatcher FINAL : public NoBaseWillBeGarbageCollect ed<CustomElementMicrotaskDispatcher> { 21 class CustomElementMicrotaskDispatcher FINAL : public NoBaseWillBeGarbageCollect ed<CustomElementMicrotaskDispatcher> {
23 WTF_MAKE_NONCOPYABLE(CustomElementMicrotaskDispatcher); 22 WTF_MAKE_NONCOPYABLE(CustomElementMicrotaskDispatcher);
24 DECLARE_EMPTY_DESTRUCTOR_WILL_BE_REMOVED(CustomElementMicrotaskDispatcher); 23 DECLARE_EMPTY_DESTRUCTOR_WILL_BE_REMOVED(CustomElementMicrotaskDispatcher);
25 public: 24 public:
26 static CustomElementMicrotaskDispatcher& instance(); 25 static CustomElementMicrotaskDispatcher& instance();
27 26
28 void enqueue(HTMLImportLoader* parentLoader, PassOwnPtrWillBeRawPtr<CustomEl ementMicrotaskStep>); 27 void enqueue(HTMLImportLoader* parentLoader, PassOwnPtrWillBeRawPtr<CustomEl ementMicrotaskStep>);
29 void enqueue(HTMLImportLoader* parentLoader, PassOwnPtrWillBeRawPtr<CustomEl ementMicrotaskImportStep>, bool importIsSync); 28 void enqueue(HTMLImportLoader* parentLoader, PassOwnPtrWillBeRawPtr<CustomEl ementMicrotaskImportStep>, bool importIsSync);
(...skipping 21 matching lines...) Expand all
51 static void dispatch(); 50 static void dispatch();
52 void doDispatch(); 51 void doDispatch();
53 52
54 bool m_hasScheduledMicrotask; 53 bool m_hasScheduledMicrotask;
55 enum { 54 enum {
56 Quiescent, 55 Quiescent,
57 Resolving, 56 Resolving,
58 DispatchingCallbacks 57 DispatchingCallbacks
59 } m_phase; 58 } m_phase;
60 59
61 RefPtrWillBeMember<CustomElementMicrotaskQueue> m_resolutionAndImports; 60 RefPtrWillBeMember<CustomElementMicrotaskStepDispatcher> m_steps;
62 RefPtrWillBeMember<CustomElementAsyncImportMicrotaskQueue> m_asyncImports;
63 WillBeHeapVector<RawPtrWillBeMember<CustomElementCallbackQueue> > m_elements ; 61 WillBeHeapVector<RawPtrWillBeMember<CustomElementCallbackQueue> > m_elements ;
64 }; 62 };
65 63
66 } 64 }
67 65
68 #if !defined(NDEBUG) 66 #if !defined(NDEBUG)
69 void showCEMD(); 67 void showCEMD();
70 #endif 68 #endif
71 69
72 #endif // CustomElementMicrotaskDispatcher_h 70 #endif // CustomElementMicrotaskDispatcher_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698