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
3// found in the LICENSE file.
4
5#ifndef WindowNameCollection_h
6#define WindowNameCollection_h
7
8#include "core/html/HTMLNameCollection.h"
9
10namespace blink {
11
12class WindowNameCollection FINAL : public HTMLNameCollection {
13public:
14    static PassRefPtrWillBeRawPtr<WindowNameCollection> create(ContainerNode& document, CollectionType type, const AtomicString& name)
15    {
16        ASSERT_UNUSED(type, type == WindowNamedItems);
17        return adoptRefWillBeNoop(new WindowNameCollection(document, name));
18    }
19
20    bool elementMatches(const Element&) const;
21
22private:
23    WindowNameCollection(ContainerNode& document, const AtomicString& name);
24};
25
26DEFINE_TYPE_CASTS(WindowNameCollection, LiveNodeListBase, collection, collection->type() == WindowNamedItems, collection.type() == WindowNamedItems);
27
28} // namespace blink
29
30#endif // WindowNameCollection_h
31