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

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 e3b1840224d4ed5e863e8ef6daedbaf369fc11e1..947e54cb55f9073030e9b9e03e6342a24e03a9bc 100644
--- a/Source/core/dom/custom/CustomElementMicrotaskQueue.h
+++ b/Source/core/dom/custom/CustomElementMicrotaskQueue.h
@@ -41,28 +41,36 @@
namespace WebCore {
-class CustomElementMicrotaskQueue : public RefCounted<CustomElementMicrotaskQueue> {
- WTF_MAKE_NONCOPYABLE(CustomElementMicrotaskQueue);
+class CustomElementMicrotaskQueueBase : public RefCounted<CustomElementMicrotaskQueueBase> {
+ WTF_MAKE_NONCOPYABLE(CustomElementMicrotaskQueueBase);
public:
- static PassRefPtr<CustomElementMicrotaskQueue> create() { return adoptRef(new CustomElementMicrotaskQueue()); }
-
+ virtual ~CustomElementMicrotaskQueueBase() { }
bool isEmpty() const { return m_queue.isEmpty(); }
- void enqueue(PassOwnPtr<CustomElementMicrotaskStep>);
-
- typedef CustomElementMicrotaskStep::Result Result;
- Result dispatch();
- bool needsProcessOrStop() const;
+ void dispatch();
#if !defined(NDEBUG)
void show(unsigned indent);
#endif
-private:
- CustomElementMicrotaskQueue() { }
+
+protected:
+ CustomElementMicrotaskQueueBase() { }
+ virtual void doDispatch() = 0;
Vector<OwnPtr<CustomElementMicrotaskStep> > m_queue;
};
+class CustomElementMicrotaskQueue : public CustomElementMicrotaskQueueBase {
+public:
+ static PassRefPtr<CustomElementMicrotaskQueue> create() { return adoptRef(new CustomElementMicrotaskQueue()); }
+
+ void enqueue(PassOwnPtr<CustomElementMicrotaskStep>);
+
+private:
+ CustomElementMicrotaskQueue() { }
+ virtual void doDispatch();
+};
+
}
#endif // CustomElementMicrotaskQueue_h

Powered by Google App Engine
This is Rietveld 408576698