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 #include "core/dom/custom/V0CustomElementMicrotaskRunQueue.h" | 5 #include "core/dom/custom/V0CustomElementMicrotaskRunQueue.h" |
6 | 6 |
7 #include "bindings/core/v8/Microtask.h" | |
8 #include "core/dom/custom/V0CustomElementAsyncImportMicrotaskQueue.h" | 7 #include "core/dom/custom/V0CustomElementAsyncImportMicrotaskQueue.h" |
9 #include "core/dom/custom/V0CustomElementSyncMicrotaskQueue.h" | 8 #include "core/dom/custom/V0CustomElementSyncMicrotaskQueue.h" |
10 #include "core/html/imports/HTMLImportLoader.h" | 9 #include "core/html/imports/HTMLImportLoader.h" |
| 10 #include "platform/bindings/Microtask.h" |
11 | 11 |
12 namespace blink { | 12 namespace blink { |
13 | 13 |
14 V0CustomElementMicrotaskRunQueue::V0CustomElementMicrotaskRunQueue() | 14 V0CustomElementMicrotaskRunQueue::V0CustomElementMicrotaskRunQueue() |
15 : sync_queue_(V0CustomElementSyncMicrotaskQueue::Create()), | 15 : sync_queue_(V0CustomElementSyncMicrotaskQueue::Create()), |
16 async_queue_(V0CustomElementAsyncImportMicrotaskQueue::Create()), | 16 async_queue_(V0CustomElementAsyncImportMicrotaskQueue::Create()), |
17 dispatch_is_pending_(false) {} | 17 dispatch_is_pending_(false) {} |
18 | 18 |
19 void V0CustomElementMicrotaskRunQueue::Enqueue( | 19 void V0CustomElementMicrotaskRunQueue::Enqueue( |
20 HTMLImportLoader* parent_loader, | 20 HTMLImportLoader* parent_loader, |
(...skipping 29 matching lines...) Expand all Loading... |
50 sync_queue_->Dispatch(); | 50 sync_queue_->Dispatch(); |
51 if (sync_queue_->IsEmpty()) | 51 if (sync_queue_->IsEmpty()) |
52 async_queue_->Dispatch(); | 52 async_queue_->Dispatch(); |
53 } | 53 } |
54 | 54 |
55 bool V0CustomElementMicrotaskRunQueue::IsEmpty() const { | 55 bool V0CustomElementMicrotaskRunQueue::IsEmpty() const { |
56 return sync_queue_->IsEmpty() && async_queue_->IsEmpty(); | 56 return sync_queue_->IsEmpty() && async_queue_->IsEmpty(); |
57 } | 57 } |
58 | 58 |
59 } // namespace blink | 59 } // namespace blink |
OLD | NEW |