| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef DOMNodeIds_h | 5 #ifndef DOMNodeIds_h |
| 6 #define DOMNodeIds_h | 6 #define DOMNodeIds_h |
| 7 | 7 |
| 8 #include "core/CoreExport.h" | 8 #include "core/CoreExport.h" |
| 9 #include "core/dom/Node.h" |
| 9 #include "core/dom/WeakIdentifierMap.h" | 10 #include "core/dom/WeakIdentifierMap.h" |
| 10 | 11 |
| 11 namespace blink { | 12 namespace blink { |
| 12 | 13 |
| 13 class Node; | |
| 14 | |
| 15 #if !ENABLE(OILPAN) | 14 #if !ENABLE(OILPAN) |
| 16 template<> struct WeakIdentifierMapTraits<Node> { | 15 template<> struct WeakIdentifierMapTraits<Node> { |
| 17 static void removedFromIdentifierMap(Node*); | 16 static void removedFromIdentifierMap(Node*); |
| 18 static void addedToIdentifierMap(Node*); | 17 static void addedToIdentifierMap(Node*); |
| 19 }; | 18 }; |
| 20 #endif | 19 #endif |
| 21 | 20 |
| 22 typedef WeakIdentifierMap<Node> WeakNodeMap; | 21 extern template class WeakIdentifierMap<Node>; |
| 22 using WeakNodeMap = WeakIdentifierMap<Node>; |
| 23 | 23 |
| 24 class CORE_EXPORT DOMNodeIds { | 24 class CORE_EXPORT DOMNodeIds { |
| 25 public: | 25 public: |
| 26 static int idForNode(Node*); | 26 static int idForNode(Node*); |
| 27 static Node* nodeForId(int); | 27 static Node* nodeForId(int); |
| 28 }; | 28 }; |
| 29 | 29 |
| 30 } // namespace blink | 30 } // namespace blink |
| 31 | 31 |
| 32 | 32 |
| 33 #endif // DOMNodeIds_h | 33 #endif // DOMNodeIds_h |
| OLD | NEW |