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

Unified Diff: sky/engine/core/dom/custom/CustomElementMicrotaskRunQueue.cpp

Issue 950523002: Delete sky/engine/core/dom/custom (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 10 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: sky/engine/core/dom/custom/CustomElementMicrotaskRunQueue.cpp
diff --git a/sky/engine/core/dom/custom/CustomElementMicrotaskRunQueue.cpp b/sky/engine/core/dom/custom/CustomElementMicrotaskRunQueue.cpp
deleted file mode 100644
index 99ec7615616ce50be74421492b3603798d17af03..0000000000000000000000000000000000000000
--- a/sky/engine/core/dom/custom/CustomElementMicrotaskRunQueue.cpp
+++ /dev/null
@@ -1,65 +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 "sky/engine/config.h"
-#include "sky/engine/core/dom/custom/CustomElementMicrotaskRunQueue.h"
-
-#include "base/bind.h"
-#include "sky/engine/core/dom/Microtask.h"
-#include "sky/engine/core/dom/custom/CustomElementAsyncImportMicrotaskQueue.h"
-#include "sky/engine/core/dom/custom/CustomElementSyncMicrotaskQueue.h"
-#include "sky/engine/core/html/imports/HTMLImportLoader.h"
-
-#include <stdio.h>
-
-namespace blink {
-
-CustomElementMicrotaskRunQueue::CustomElementMicrotaskRunQueue()
- : m_syncQueue(CustomElementSyncMicrotaskQueue::create())
- , m_asyncQueue(CustomElementAsyncImportMicrotaskQueue::create())
- , m_dispatchIsPending(false)
- , m_weakFactory(this)
-{
-}
-
-CustomElementMicrotaskRunQueue::~CustomElementMicrotaskRunQueue()
-{
-}
-
-void CustomElementMicrotaskRunQueue::enqueue(HTMLImportLoader* parentLoader, PassOwnPtr<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(base::Bind(&CustomElementMicrotaskRunQueue::dispatch, m_weakFactory.GetWeakPtr()));
- m_dispatchIsPending = true;
-}
-
-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
« no previous file with comments | « sky/engine/core/dom/custom/CustomElementMicrotaskRunQueue.h ('k') | sky/engine/core/dom/custom/CustomElementMicrotaskStep.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698