Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1441)

Unified Diff: Source/modules/fetch/Headers.h

Issue 848673002: Add keys(), values() and entries() methods on iterable<> interfaces (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/testing/Internals.cpp ('k') | Source/modules/fetch/Headers.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/fetch/Headers.h
diff --git a/Source/modules/fetch/Headers.h b/Source/modules/fetch/Headers.h
index bd100544b2b6dd81eb897e91c6bf99455a0db9a5..10cad823e622ecd3c148a26928b712f4655be897 100644
--- a/Source/modules/fetch/Headers.h
+++ b/Source/modules/fetch/Headers.h
@@ -7,6 +7,7 @@
#include "bindings/core/v8/ScriptState.h"
#include "bindings/core/v8/ScriptWrappable.h"
+#include "core/dom/Iterable.h"
#include "modules/fetch/FetchHeaderList.h"
#include "wtf/Forward.h"
#include "wtf/PassOwnPtr.h"
@@ -18,7 +19,7 @@ class ExceptionState;
class Iterator;
// http://fetch.spec.whatwg.org/#headers-class
-class Headers final : public GarbageCollected<Headers>, public ScriptWrappable {
+class Headers final : public GarbageCollectedFinalized<Headers>, public ScriptWrappable, public PairIterable<String, String> {
DEFINE_WRAPPERTYPEINFO();
public:
enum Guard { ImmutableGuard, RequestGuard, RequestNoCORSGuard, ResponseGuard, NoneGuard };
@@ -42,9 +43,6 @@ public:
bool has(const String& key, ExceptionState&);
void set(const String& key, const String& value, ExceptionState&);
- // iterable<ByteString, ByteString>
- Iterator* iterator(ScriptState*, ExceptionState&);
-
void setGuard(Guard guard) { m_guard = guard; }
Guard guard() const { return m_guard; }
@@ -63,6 +61,8 @@ private:
Member<FetchHeaderList> m_headerList;
Guard m_guard;
+
+ IterationSource* startIteration(ScriptState*, ExceptionState&) override;
};
} // namespace blink
« no previous file with comments | « Source/core/testing/Internals.cpp ('k') | Source/modules/fetch/Headers.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698