Index: Source/modules/serviceworkers/FetchHeaderList.h |
diff --git a/Source/core/rendering/style/StyleWillChangeData.h b/Source/modules/serviceworkers/FetchHeaderList.h |
similarity index 21% |
copy from Source/core/rendering/style/StyleWillChangeData.h |
copy to Source/modules/serviceworkers/FetchHeaderList.h |
index 9a9b6e7621224b978eaa5ff7340fbc10f8fdc4cb..8ca4ed094b5cdb098f7e27043f9a2c74e2074d40 100644 |
--- a/Source/core/rendering/style/StyleWillChangeData.h |
+++ b/Source/modules/serviceworkers/FetchHeaderList.h |
@@ -2,41 +2,49 @@ |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
-#ifndef StyleWillChangeData_h |
-#define StyleWillChangeData_h |
+#ifndef FetchHeaderList_h |
+#define FetchHeaderList_h |
-#include "core/CSSPropertyNames.h" |
-#include "core/CSSValueKeywords.h" |
+#include "wtf/OwnPtr.h" |
#include "wtf/PassRefPtr.h" |
#include "wtf/RefCounted.h" |
#include "wtf/Vector.h" |
+#include "wtf/text/WTFString.h" |
namespace WebCore { |
-class StyleWillChangeData : public RefCounted<StyleWillChangeData> { |
+// http://fetch.spec.whatwg.org/#terminology-headers |
+class FetchHeaderList FINAL : public RefCounted<FetchHeaderList> { |
public: |
- static PassRefPtr<StyleWillChangeData> create() { return adoptRef(new StyleWillChangeData); } |
- PassRefPtr<StyleWillChangeData> copy() const { return adoptRef(new StyleWillChangeData(*this)); } |
- |
- bool operator==(const StyleWillChangeData& o) const |
- { |
- return m_properties == o.m_properties && m_contents == o.m_contents && m_scrollPosition == o.m_scrollPosition; |
- } |
- |
- bool operator!=(const StyleWillChangeData& o) const |
- { |
- return !(*this == o); |
- } |
- |
- Vector<CSSPropertyID> m_properties; |
- unsigned m_contents : 1; |
- unsigned m_scrollPosition : 1; |
+ typedef std::pair<String, String> Header; |
falken
2014/06/27 02:08:06
nit: I think by include-what-you-use rules you sho
horo
2014/06/27 04:19:10
Done.
|
+ static PassRefPtr<FetchHeaderList> create(); |
+ |
+ ~FetchHeaderList(); |
+ void append(const String&, const String&); |
+ void set(const String&, const String&); |
+ // FIXME: Implement parse() |
+ // FIXME: Implement extractMIMEType() |
+ |
+ size_t size() const; |
+ void remove(const String&); |
+ bool get(const String&, String&) const; |
+ void getAll(const String&, Vector<String>&) const; |
+ bool has(const String&) const; |
+ void clearList(); |
+ |
+ const Vector<OwnPtr<Header> >& list() const { return m_headerList; } |
+ |
+ static bool isValidHeaderName(const String&); |
+ static bool isValidHeaderValue(const String&); |
+ static bool isSimpleHeader(const String&, const String&); |
+ static bool isForbiddenHeaderName(const String&); |
+ static bool isForbiddenResponseHeaderName(const String&); |
private: |
- StyleWillChangeData(); |
- StyleWillChangeData(const StyleWillChangeData&); |
+ FetchHeaderList(); |
+ Vector<OwnPtr<Header> > m_headerList; |
}; |
} // namespace WebCore |
-#endif // StyleWillChangeData_h |
+#endif // FetchHeaderList_h |