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

Unified Diff: third_party/WebKit/Source/core/dom/custom/CustomElementMicrotaskRunQueue.cpp

Issue 1914923002: Rename all existing custom element classes as V0 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: CustomElementV0 -> V0CustomElement Created 4 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/dom/custom/CustomElementMicrotaskRunQueue.cpp
diff --git a/third_party/WebKit/Source/core/dom/custom/CustomElementMicrotaskRunQueue.cpp b/third_party/WebKit/Source/core/dom/custom/CustomElementMicrotaskRunQueue.cpp
deleted file mode 100644
index 1697aa0a0b80c1e25594687f3f9fab9364428e1b..0000000000000000000000000000000000000000
--- a/third_party/WebKit/Source/core/dom/custom/CustomElementMicrotaskRunQueue.cpp
+++ /dev/null
@@ -1,62 +0,0 @@
-// Copyright 2014 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "core/dom/custom/CustomElementMicrotaskRunQueue.h"
-
-#include "bindings/core/v8/Microtask.h"
-#include "core/dom/custom/CustomElementAsyncImportMicrotaskQueue.h"
-#include "core/dom/custom/CustomElementSyncMicrotaskQueue.h"
-#include "core/html/imports/HTMLImportLoader.h"
-
-namespace blink {
-
-CustomElementMicrotaskRunQueue::CustomElementMicrotaskRunQueue()
- : m_syncQueue(CustomElementSyncMicrotaskQueue::create())
- , m_asyncQueue(CustomElementAsyncImportMicrotaskQueue::create())
- , m_dispatchIsPending(false)
-{
-}
-
-void CustomElementMicrotaskRunQueue::enqueue(HTMLImportLoader* parentLoader, CustomElementMicrotaskStep* step, bool importIsSync)
-{
- if (importIsSync) {
- if (parentLoader)
- parentLoader->microtaskQueue()->enqueue(step);
- else
- m_syncQueue->enqueue(step);
- } else {
- m_asyncQueue->enqueue(step);
- }
-
- requestDispatchIfNeeded();
-}
-
-void CustomElementMicrotaskRunQueue::requestDispatchIfNeeded()
-{
- if (m_dispatchIsPending || isEmpty())
- return;
- Microtask::enqueueMicrotask(WTF::bind(&CustomElementMicrotaskRunQueue::dispatch, WeakPersistentThisPointer<CustomElementMicrotaskRunQueue>(this)));
- m_dispatchIsPending = true;
-}
-
-DEFINE_TRACE(CustomElementMicrotaskRunQueue)
-{
- visitor->trace(m_syncQueue);
- visitor->trace(m_asyncQueue);
-}
-
-void CustomElementMicrotaskRunQueue::dispatch()
-{
- m_dispatchIsPending = false;
- m_syncQueue->dispatch();
- if (m_syncQueue->isEmpty())
- m_asyncQueue->dispatch();
-}
-
-bool CustomElementMicrotaskRunQueue::isEmpty() const
-{
- return m_syncQueue->isEmpty() && m_asyncQueue->isEmpty();
-}
-
-} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698