| OLD | NEW |
| 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 CustomElementMicrotaskRunQueue_h | 5 #ifndef CustomElementMicrotaskRunQueue_h |
| 6 #define CustomElementMicrotaskRunQueue_h | 6 #define CustomElementMicrotaskRunQueue_h |
| 7 | 7 |
| 8 #include "platform/heap/Handle.h" | 8 #include "platform/heap/Handle.h" |
| 9 #include "wtf/WeakPtr.h" | |
| 10 | 9 |
| 11 namespace blink { | 10 namespace blink { |
| 12 | 11 |
| 13 class CustomElementSyncMicrotaskQueue; | 12 class CustomElementSyncMicrotaskQueue; |
| 14 class CustomElementAsyncImportMicrotaskQueue; | 13 class CustomElementAsyncImportMicrotaskQueue; |
| 15 class CustomElementMicrotaskStep; | 14 class CustomElementMicrotaskStep; |
| 16 class HTMLImportLoader; | 15 class HTMLImportLoader; |
| 17 | 16 |
| 18 class CustomElementMicrotaskRunQueue : public GarbageCollectedFinalized<CustomEl
ementMicrotaskRunQueue> { | 17 class CustomElementMicrotaskRunQueue : public GarbageCollected<CustomElementMicr
otaskRunQueue> { |
| 19 public: | 18 public: |
| 20 static CustomElementMicrotaskRunQueue* create() { return new CustomElementMi
crotaskRunQueue(); } | 19 static CustomElementMicrotaskRunQueue* create() |
| 20 { |
| 21 return new CustomElementMicrotaskRunQueue; |
| 22 } |
| 21 | 23 |
| 22 void enqueue(HTMLImportLoader* parentLoader, CustomElementMicrotaskStep*, bo
ol importIsSync); | 24 void enqueue(HTMLImportLoader* parentLoader, CustomElementMicrotaskStep*, bo
ol importIsSync); |
| 23 void requestDispatchIfNeeded(); | 25 void requestDispatchIfNeeded(); |
| 24 bool isEmpty() const; | 26 bool isEmpty() const; |
| 25 | 27 |
| 26 DECLARE_TRACE(); | 28 DECLARE_TRACE(); |
| 27 | 29 |
| 28 private: | 30 private: |
| 29 CustomElementMicrotaskRunQueue(); | 31 CustomElementMicrotaskRunQueue(); |
| 30 | 32 |
| 31 void dispatch(); | 33 void dispatch(); |
| 32 | 34 |
| 33 Member<CustomElementSyncMicrotaskQueue> m_syncQueue; | 35 Member<CustomElementSyncMicrotaskQueue> m_syncQueue; |
| 34 Member<CustomElementAsyncImportMicrotaskQueue> m_asyncQueue; | 36 Member<CustomElementAsyncImportMicrotaskQueue> m_asyncQueue; |
| 35 bool m_dispatchIsPending; | 37 bool m_dispatchIsPending; |
| 36 #if !ENABLE(OILPAN) | |
| 37 WeakPtrFactory<CustomElementMicrotaskRunQueue> m_weakFactory; | |
| 38 #endif | |
| 39 }; | 38 }; |
| 40 | 39 |
| 41 } // namespace blink | 40 } // namespace blink |
| 42 | 41 |
| 43 #endif // CustomElementMicrotaskRunQueue_h | 42 #endif // CustomElementMicrotaskRunQueue_h |
| OLD | NEW |