| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 static PassOwnPtr<CustomElementUpgradeCandidateMap> create(); | 48 static PassOwnPtr<CustomElementUpgradeCandidateMap> create(); |
| 49 virtual ~CustomElementUpgradeCandidateMap(); | 49 virtual ~CustomElementUpgradeCandidateMap(); |
| 50 | 50 |
| 51 // API for CustomElementRegistrationContext to save and take candidates | 51 // API for CustomElementRegistrationContext to save and take candidates |
| 52 | 52 |
| 53 typedef LinkedHashSet<RawPtr<Element> > ElementSet; | 53 typedef LinkedHashSet<RawPtr<Element> > ElementSet; |
| 54 | 54 |
| 55 void add(const CustomElementDescriptor&, Element*); | 55 void add(const CustomElementDescriptor&, Element*); |
| 56 PassOwnPtr<ElementSet> takeUpgradeCandidatesFor(const CustomElementDescripto
r&); | 56 PassOwnPtr<ElementSet> takeUpgradeCandidatesFor(const CustomElementDescripto
r&); |
| 57 | 57 |
| 58 virtual void trace(Visitor*) override; | |
| 59 | |
| 60 private: | 58 private: |
| 61 CustomElementUpgradeCandidateMap() { } | 59 CustomElementUpgradeCandidateMap() { } |
| 62 | 60 |
| 63 virtual void elementWasDestroyed(Element*) override; | 61 virtual void elementWasDestroyed(Element*) override; |
| 64 | 62 |
| 65 virtual void elementDidFinishParsingChildren(Element*) override; | 63 virtual void elementDidFinishParsingChildren(Element*) override; |
| 66 void moveToEnd(Element*); | 64 void moveToEnd(Element*); |
| 67 | 65 |
| 68 typedef HashMap<RawPtr<Element>, CustomElementDescriptor> UpgradeCandidateMa
p; | 66 typedef HashMap<RawPtr<Element>, CustomElementDescriptor> UpgradeCandidateMa
p; |
| 69 UpgradeCandidateMap m_upgradeCandidates; | 67 UpgradeCandidateMap m_upgradeCandidates; |
| 70 | 68 |
| 71 typedef HashMap<CustomElementDescriptor, OwnPtr<ElementSet> > UnresolvedDefi
nitionMap; | 69 typedef HashMap<CustomElementDescriptor, OwnPtr<ElementSet> > UnresolvedDefi
nitionMap; |
| 72 UnresolvedDefinitionMap m_unresolvedDefinitions; | 70 UnresolvedDefinitionMap m_unresolvedDefinitions; |
| 73 }; | 71 }; |
| 74 | 72 |
| 75 } | 73 } |
| 76 | 74 |
| 77 #endif // CustomElementUpgradeCandidateMap_h | 75 #endif // CustomElementUpgradeCandidateMap_h |
| OLD | NEW |