Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(362)

Side by Side Diff: Source/core/dom/DOMNodeIds.h

Issue 1089933004: DevTools: make DOMNodeIds a trivial wrapper around WeakIdentifierMap (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/core.gypi ('k') | Source/core/dom/DOMNodeIds.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
OLDNEW
« no previous file with comments | « Source/core/core.gypi ('k') | Source/core/dom/DOMNodeIds.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698