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

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

Issue 22847004: Rename CustomElementUpgradeCandidateMap::DestructionObserverMap. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 4 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
« no previous file with comments | « no previous file | Source/core/dom/CustomElementUpgradeCandidateMap.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/CustomElementUpgradeCandidateMap.h
diff --git a/Source/core/dom/CustomElementUpgradeCandidateMap.h b/Source/core/dom/CustomElementUpgradeCandidateMap.h
index 2814c0a2d200720f308ada21e94e8da318e1172d..4456964df326ebd48032532cb56c8f1a0b384ad7 100644
--- a/Source/core/dom/CustomElementUpgradeCandidateMap.h
+++ b/Source/core/dom/CustomElementUpgradeCandidateMap.h
@@ -47,20 +47,23 @@ public:
CustomElementUpgradeCandidateMap() { }
~CustomElementUpgradeCandidateMap();
+ // API for CustomElement to notify observers
static void elementWasDestroyed(Element*);
- void add(const CustomElementDescriptor&, Element*);
- void remove(Element*);
+ // API for CustomElementRegistrationContext to save and take candidates
typedef ListHashSet<Element*> ElementSet;
+
+ void add(const CustomElementDescriptor&, Element*);
+ void remove(Element*);
ElementSet takeUpgradeCandidatesFor(const CustomElementDescriptor&);
private:
- // Maps elements to upgrade candidate maps observing their destruction
- typedef HashMap<Element*, CustomElementUpgradeCandidateMap*> DestructionObserverMap;
- static DestructionObserverMap& destructionObservers();
- static void registerForElementDestructionNotification(Element*, CustomElementUpgradeCandidateMap*);
- static void unregisterForElementDestructionNotification(Element*, CustomElementUpgradeCandidateMap*);
+ // Maps elements to upgrade candidate maps observing them
+ typedef HashMap<Element*, CustomElementUpgradeCandidateMap*> ElementObserverMap;
+ static ElementObserverMap& elementObservers();
+ void observe(Element*);
+ void unobserve(Element*);
typedef HashMap<Element*, CustomElementDescriptor> UpgradeCandidateMap;
UpgradeCandidateMap m_upgradeCandidates;
« no previous file with comments | « no previous file | Source/core/dom/CustomElementUpgradeCandidateMap.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698