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

Unified Diff: Source/core/dom/CustomElementCallback.h

Issue 17707002: Implement Custom Elements inserted and removed callbacks. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 6 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/CustomElementCallback.h
diff --git a/Source/core/dom/CustomElementCallback.h b/Source/core/dom/CustomElementCallback.h
index d71e35afeeddd2d552ecf339fcb1ab626dbcc76a..c701651061c98c72e979172f1fd98d5d62ad0803 100644
--- a/Source/core/dom/CustomElementCallback.h
+++ b/Source/core/dom/CustomElementCallback.h
@@ -41,15 +41,23 @@ class CustomElementCallback : public RefCounted<CustomElementCallback> {
public:
virtual ~CustomElementCallback() { }
- bool hasReady() const { return m_which == Ready; }
+ bool hasReady() const { return m_which & Ready; }
virtual void ready(Element*) = 0;
-protected:
+ bool hasInserted() const { return m_which & Inserted; }
+ virtual void inserted(Element*) = 0;
+
+ bool hasRemoved() const { return m_which & Removed; }
+ virtual void removed(Element*) = 0;
+
enum CallbackType {
- None,
- Ready
+ None = 0,
+ Ready = 1 << 0,
+ Inserted = 1 << 1,
+ Removed = 1 << 2
};
+protected:
CustomElementCallback(CallbackType which) : m_which(which) { }
private:

Powered by Google App Engine
This is Rietveld 408576698