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/WeakIdentifierMap.h" |
9 | 10 |
10 namespace blink { | 11 namespace blink { |
11 | 12 |
12 class Node; | 13 class Node; |
13 | 14 |
| 15 #if !ENABLE(OILPAN) |
| 16 template<> struct WeakIdentifierMapTraits<Node> { |
| 17 static void removedFromIdentifierMap(Node*); |
| 18 static void addedToIdentifierMap(Node*); |
| 19 }; |
| 20 #endif |
| 21 |
| 22 typedef WeakIdentifierMap<Node> WeakNodeMap; |
| 23 |
14 class CORE_EXPORT DOMNodeIds { | 24 class CORE_EXPORT DOMNodeIds { |
15 public: | 25 public: |
16 static int idForNode(Node*); | 26 static int idForNode(Node*); |
17 static Node* nodeForId(int); | 27 static Node* nodeForId(int); |
18 }; | 28 }; |
19 | 29 |
20 } // namespace blink | 30 } // namespace blink |
21 | 31 |
22 | 32 |
23 #endif // DOMNodeIds_h | 33 #endif // DOMNodeIds_h |
OLD | NEW |