Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef Headers_h | 5 #ifndef Headers_h |
| 6 #define Headers_h | 6 #define Headers_h |
| 7 | 7 |
| 8 #include "bindings/v8/ScriptWrappable.h" | 8 #include "bindings/v8/ScriptWrappable.h" |
| 9 #include "modules/serviceworkers/FetchHeaderList.h" | 9 #include "modules/serviceworkers/FetchHeaderList.h" |
| 10 #include "wtf/Forward.h" | 10 #include "wtf/Forward.h" |
| (...skipping 29 matching lines...) Expand all Loading... | |
| 40 Vector<String> getAll(const String& key, ExceptionState&); | 40 Vector<String> getAll(const String& key, ExceptionState&); |
| 41 bool has(const String& key, ExceptionState&); | 41 bool has(const String& key, ExceptionState&); |
| 42 void set(const String& key, const String& value, ExceptionState&); | 42 void set(const String& key, const String& value, ExceptionState&); |
| 43 unsigned long size() const; | 43 unsigned long size() const; |
| 44 void forEach(PassOwnPtr<HeadersForEachCallback>, ScriptValue&); | 44 void forEach(PassOwnPtr<HeadersForEachCallback>, ScriptValue&); |
| 45 void forEach(PassOwnPtr<HeadersForEachCallback>); | 45 void forEach(PassOwnPtr<HeadersForEachCallback>); |
| 46 | 46 |
| 47 void setGuard(Guard guard) { m_guard = guard; } | 47 void setGuard(Guard guard) { m_guard = guard; } |
| 48 Guard guard() const { return m_guard; } | 48 Guard guard() const { return m_guard; } |
| 49 | 49 |
| 50 void fillWith(const Headers*, ExceptionState&); | |
|
yhirano
2014/07/02 01:53:07
Please describe that |this| must be cleared before
horo
2014/07/02 03:33:04
Done.
| |
| 51 void fillWith(const Dictionary&, ExceptionState&); | |
| 52 | |
| 50 private: | 53 private: |
| 51 Headers(); | 54 Headers(); |
| 52 // Shares the FetchHeaderList. Called when creating a Request or Response. | 55 // Shares the FetchHeaderList. Called when creating a Request or Response. |
| 53 explicit Headers(FetchHeaderList*); | 56 explicit Headers(FetchHeaderList*); |
| 54 void forEachInternal(PassOwnPtr<HeadersForEachCallback>, ScriptValue*); | 57 void forEachInternal(PassOwnPtr<HeadersForEachCallback>, ScriptValue*); |
| 55 | 58 |
| 56 void fillWith(const Headers*, ExceptionState&); | |
| 57 void fillWith(const Dictionary&, ExceptionState&); | |
| 58 | |
| 59 RefPtr<FetchHeaderList> m_headerList; | 59 RefPtr<FetchHeaderList> m_headerList; |
| 60 Guard m_guard; | 60 Guard m_guard; |
| 61 }; | 61 }; |
| 62 | 62 |
| 63 } // namespace WebCore | 63 } // namespace WebCore |
| 64 | 64 |
| 65 #endif // Headers_h | 65 #endif // Headers_h |
| OLD | NEW |