| OLD | NEW |
| (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_CUSTOMELEMENTMICROTASKRUNQUEUE_H_ | |
| 6 #define SKY_ENGINE_CORE_DOM_CUSTOM_CUSTOMELEMENTMICROTASKRUNQUEUE_H_ | |
| 7 | |
| 8 #include "base/memory/weak_ptr.h" | |
| 9 #include "sky/engine/wtf/PassOwnPtr.h" | |
| 10 #include "sky/engine/wtf/RefCounted.h" | |
| 11 #include "sky/engine/wtf/RefPtr.h" | |
| 12 | |
| 13 namespace blink { | |
| 14 | |
| 15 class CustomElementSyncMicrotaskQueue; | |
| 16 class CustomElementAsyncImportMicrotaskQueue; | |
| 17 class CustomElementMicrotaskStep; | |
| 18 class HTMLImportLoader; | |
| 19 | |
| 20 class CustomElementMicrotaskRunQueue : public RefCounted<CustomElementMicrotaskR
unQueue> { | |
| 21 public: | |
| 22 static PassRefPtr<CustomElementMicrotaskRunQueue> create() { return adoptRef
(new CustomElementMicrotaskRunQueue()); } | |
| 23 ~CustomElementMicrotaskRunQueue(); | |
| 24 | |
| 25 void enqueue(HTMLImportLoader* parentLoader, PassOwnPtr<CustomElementMicrota
skStep>, bool importIsSync); | |
| 26 void requestDispatchIfNeeded(); | |
| 27 bool isEmpty() const; | |
| 28 | |
| 29 private: | |
| 30 CustomElementMicrotaskRunQueue(); | |
| 31 | |
| 32 void dispatch(); | |
| 33 | |
| 34 RefPtr<CustomElementSyncMicrotaskQueue> m_syncQueue; | |
| 35 RefPtr<CustomElementAsyncImportMicrotaskQueue> m_asyncQueue; | |
| 36 bool m_dispatchIsPending; | |
| 37 | |
| 38 base::WeakPtrFactory<CustomElementMicrotaskRunQueue> m_weakFactory; | |
| 39 }; | |
| 40 | |
| 41 } | |
| 42 | |
| 43 #endif // SKY_ENGINE_CORE_DOM_CUSTOM_CUSTOMELEMENTMICROTASKRUNQUEUE_H_ | |
| OLD | NEW |