| 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;
|
|
|