Chromium Code Reviews| Index: Source/core/css/FontFaceSet.h | 
| diff --git a/Source/core/css/FontFaceSet.h b/Source/core/css/FontFaceSet.h | 
| index 6a334872573e8352e4eb8dcb5990a4c14c69fd03..1f0aec7a70f5cd209559de5686817527362ce5fe 100644 | 
| --- a/Source/core/css/FontFaceSet.h | 
| +++ b/Source/core/css/FontFaceSet.h | 
| @@ -30,6 +30,7 @@ | 
| #include "core/css/FontFace.h" | 
| #include "core/css/FontFaceSetForEachCallback.h" | 
| #include "core/dom/ActiveDOMObject.h" | 
| +#include "core/dom/Iterator.h" | 
| #include "core/events/EventListener.h" | 
| #include "core/events/EventTarget.h" | 
| #include "platform/AsyncMethodRunner.h" | 
| @@ -84,10 +85,16 @@ public: | 
| void forEach(PassOwnPtrWillBeRawPtr<FontFaceSetForEachCallback>, const ScriptValue& thisArg) const; | 
| void forEach(PassOwnPtrWillBeRawPtr<FontFaceSetForEachCallback>) const; | 
| bool has(FontFace*, ExceptionState&) const; | 
| + Iterator* keys(); | 
| + Iterator* values(); | 
| + Iterator* entries(); | 
| + Iterator* iterator(ScriptState*, ExceptionState&) { return values(); } | 
| unsigned long size() const; | 
| AtomicString status() const; | 
| + FontFace* fontFaceAt(size_t index) const; | 
| + | 
| virtual ExecutionContext* executionContext() const OVERRIDE; | 
| virtual const AtomicString& interfaceName() const OVERRIDE; | 
| @@ -113,6 +120,33 @@ public: | 
| #endif | 
| private: | 
| + class FontFaceSetIterator FINAL : public Iterator { | 
| + public: | 
| + enum Kind { Keys, Values, Entries }; | 
| + | 
| + FontFaceSetIterator(PassRefPtrWillBeRawPtr<FontFaceSet> fontFaceSet, Kind kind) | 
| + : m_fontFaceSet(fontFaceSet) | 
| + , m_kind(kind) | 
| + , m_index(0) { } | 
| + ~FontFaceSetIterator() { } | 
| 
 
yhirano
2014/09/11 08:04:45
+virtual
 
Kunihiko Sakamoto
2014/09/11 10:47:36
Done.
 
 | 
| + virtual ScriptValue next(ScriptState*, ExceptionState&) OVERRIDE; | 
| + virtual ScriptValue next(ScriptState* scriptState, ScriptValue, ExceptionState& exceptionState) OVERRIDE | 
| + { | 
| + return next(scriptState, exceptionState); | 
| + } | 
| + | 
| + virtual void trace(Visitor* visitor) OVERRIDE | 
| + { | 
| + visitor->trace(m_fontFaceSet); | 
| + Iterator::trace(visitor); | 
| + } | 
| + | 
| + private: | 
| + RefPtrWillBeMember<FontFaceSet> m_fontFaceSet; | 
| + Kind m_kind; | 
| + size_t m_index; | 
| + }; | 
| + | 
| static PassRefPtrWillBeRawPtr<FontFaceSet> create(Document& document) | 
| { | 
| return adoptRefWillBeNoop(new FontFaceSet(document)); |