| Index: third_party/WebKit/Source/bindings/core/v8/Iterable.h
|
| diff --git a/third_party/WebKit/Source/bindings/core/v8/Iterable.h b/third_party/WebKit/Source/bindings/core/v8/Iterable.h
|
| index d85365fc052b25fc42b81d9b59d826816e3d3c13..b83f6510032a954d0b6bfcdcadfb5d8eefe1071d 100644
|
| --- a/third_party/WebKit/Source/bindings/core/v8/Iterable.h
|
| +++ b/third_party/WebKit/Source/bindings/core/v8/Iterable.h
|
| @@ -175,7 +175,7 @@ class Iterable {
|
| };
|
|
|
| // Utiltity mixin base-class for classes implementing IDL interfaces with
|
| -// "iterable<T1, T2>".
|
| +// "iterable<T1, T2>" or "maplike<T1, T2>".
|
| template <typename KeyType, typename ValueType>
|
| class PairIterable : public Iterable<KeyType, ValueType> {
|
| public:
|
| @@ -185,6 +185,20 @@ class PairIterable : public Iterable<KeyType, ValueType> {
|
| }
|
| };
|
|
|
| +// Utiltity mixin base-class for classes implementing IDL interfaces with
|
| +// "setlike<V>" (not "iterable<V>").
|
| +// IDL interfaces with "iterable<V>" (value iterators) inherit @@iterator,
|
| +// values(), entries(), keys() and forEach() from the %ArrayPrototype%
|
| +// intrinsic object automatically.
|
| +template <typename ValueType>
|
| +class SetlikeIterable : public Iterable<ValueType, ValueType> {
|
| + public:
|
| + Iterator* GetIterator(ScriptState* script_state,
|
| + ExceptionState& exception_state) {
|
| + return this->valuesForBinding(script_state, exception_state);
|
| + }
|
| +};
|
| +
|
| } // namespace blink
|
|
|
| #endif // Iterable_h
|
|
|