Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / Source / core / dom / Iterator.h
blob4710590e382b6e0bd59e72c2009c7664c29a681b
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.
5 #ifndef Iterator_h
6 #define Iterator_h
8 #include "bindings/core/v8/ScriptValue.h"
9 #include "bindings/core/v8/ScriptWrappable.h"
10 #include "core/CoreExport.h"
11 #include "platform/heap/Handle.h"
13 namespace blink {
15 class ExceptionState;
17 class CORE_EXPORT Iterator : public GarbageCollectedFinalized<Iterator>, public ScriptWrappable {
18 DEFINE_WRAPPERTYPEINFO();
19 public:
20 Iterator() { }
21 virtual ~Iterator() { }
23 virtual ScriptValue next(ScriptState*, ExceptionState&) = 0;
24 virtual ScriptValue next(ScriptState*, ScriptValue /* value */, ExceptionState&) = 0;
25 Iterator* iterator(ScriptState*, ExceptionState&) { return this; }
27 DEFINE_INLINE_VIRTUAL_TRACE() { }
30 } // namespace blink
32 #endif // Iterator_h