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/Node.h" |
10 #include "core/dom/WeakIdentifierMap.h" | 10 #include "core/dom/WeakIdentifierMap.h" |
11 #include "platform/wtf/Allocator.h" | 11 #include "platform/wtf/Allocator.h" |
12 | 12 |
13 namespace blink { | 13 namespace blink { |
14 | 14 |
15 DECLARE_WEAK_IDENTIFIER_MAP(Node); | 15 DECLARE_WEAK_IDENTIFIER_MAP(Node, uint64_t); |
16 | |
17 using DOMNodeId = uint64_t; | |
wkorman
2017/05/08 18:23:25
Maybe suzyh already asked, can we not put using ab
| |
16 | 18 |
17 class CORE_EXPORT DOMNodeIds { | 19 class CORE_EXPORT DOMNodeIds { |
18 STATIC_ONLY(DOMNodeIds); | 20 STATIC_ONLY(DOMNodeIds); |
19 | 21 |
20 public: | 22 public: |
21 static int IdForNode(Node*); | 23 static DOMNodeId IdForNode(Node*); |
22 static Node* NodeForId(int id); | 24 static Node* NodeForId(DOMNodeId); |
23 }; | 25 }; |
24 | 26 |
25 } // namespace blink | 27 } // namespace blink |
26 | 28 |
27 #endif // DOMNodeIds_h | 29 #endif // DOMNodeIds_h |
OLD | NEW |