blob: 52023a46245cf11edffd3698fa3a83dce2b9fccc [file] [log] [blame]
// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef DOMNodeIds_h
#define DOMNodeIds_h
#include "core/CoreExport.h"
#include "core/dom/Node.h"
#include "core/dom/WeakIdentifierMap.h"
#include "wtf/Allocator.h"
namespace blink {
#if !ENABLE(OILPAN)
template<> struct WeakIdentifierMapTraits<Node> {
static void removedFromIdentifierMap(Node*);
static void addedToIdentifierMap(Node*);
};
#endif
DECLARE_WEAK_IDENTIFIER_MAP(Node);
class CORE_EXPORT DOMNodeIds {
STATIC_ONLY(DOMNodeIds);
public:
static int idForNode(Node*);
static Node* nodeForId(int id);
};
} // namespace blink
#endif // DOMNodeIds_h