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

Unified Diff: Source/core/dom/custom/CustomElementMicrotaskQueue.h

Issue 288323004: HTML Imports: Get rid of needsProcessOrStop() from dom/custom/ (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 7 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: Source/core/dom/custom/CustomElementMicrotaskQueue.h
diff --git a/Source/core/dom/custom/CustomElementMicrotaskQueue.h b/Source/core/dom/custom/CustomElementMicrotaskQueue.h
index 02bcd1dbb2dbdd09aadba15c0f68b0df34ead3cd..fbff84be298eb7880c129d28c7567f1efcc61da7 100644
--- a/Source/core/dom/custom/CustomElementMicrotaskQueue.h
+++ b/Source/core/dom/custom/CustomElementMicrotaskQueue.h
@@ -42,32 +42,38 @@
namespace WebCore {
-class CustomElementMicrotaskQueue FINAL : public RefCountedWillBeGarbageCollectedFinalized<CustomElementMicrotaskQueue> {
- WTF_MAKE_NONCOPYABLE(CustomElementMicrotaskQueue);
+class CustomElementMicrotaskQueueBase : public RefCountedWillBeGarbageCollectedFinalized<CustomElementMicrotaskQueueBase> {
+ WTF_MAKE_NONCOPYABLE(CustomElementMicrotaskQueueBase);
public:
- static PassRefPtrWillBeRawPtr<CustomElementMicrotaskQueue> create()
- {
- return adoptRefWillBeNoop(new CustomElementMicrotaskQueue());
- }
+ virtual ~CustomElementMicrotaskQueueBase() { }
bool isEmpty() const { return m_queue.isEmpty(); }
- void enqueue(PassOwnPtrWillBeRawPtr<CustomElementMicrotaskStep>);
-
- typedef CustomElementMicrotaskStep::Result Result;
- Result dispatch();
- bool needsProcessOrStop() const;
+ void dispatch();
void trace(Visitor*);
#if !defined(NDEBUG)
void show(unsigned indent);
#endif
-private:
- CustomElementMicrotaskQueue() { }
+
+protected:
+ CustomElementMicrotaskQueueBase() { }
+ virtual void doDispatch() = 0;
WillBeHeapVector<OwnPtrWillBeMember<CustomElementMicrotaskStep> > m_queue;
};
+class CustomElementMicrotaskQueue : public CustomElementMicrotaskQueueBase {
+public:
+ static PassRefPtrWillBeRawPtr<CustomElementMicrotaskQueue> create() { return adoptRefWillBeNoop(new CustomElementMicrotaskQueue()); }
+
+ void enqueue(PassOwnPtr<CustomElementMicrotaskStep>);
+
+private:
+ CustomElementMicrotaskQueue() { }
+ virtual void doDispatch();
+};
+
}
#endif // CustomElementMicrotaskQueue_h
« no previous file with comments | « Source/core/dom/custom/CustomElementMicrotaskImportStep.cpp ('k') | Source/core/dom/custom/CustomElementMicrotaskQueue.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698