OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 URLSearchParams_h | 5 #ifndef URLSearchParams_h |
6 #define URLSearchParams_h | 6 #define URLSearchParams_h |
7 | 7 |
8 #include "bindings/core/v8/Iterable.h" | 8 #include "bindings/core/v8/Iterable.h" |
9 #include "bindings/core/v8/ScriptWrappable.h" | 9 #include "bindings/core/v8/ScriptWrappable.h" |
10 #include "bindings/core/v8/UnionTypesCore.h" | 10 #include "bindings/core/v8/UnionTypesCore.h" |
11 #include "platform/heap/Handle.h" | 11 #include "platform/heap/Handle.h" |
| 12 #include "platform/network/EncodedFormData.h" |
12 #include "wtf/Forward.h" | 13 #include "wtf/Forward.h" |
13 #include "wtf/text/WTFString.h" | 14 #include "wtf/text/WTFString.h" |
14 #include <utility> | 15 #include <utility> |
15 | 16 |
16 namespace blink { | 17 namespace blink { |
17 | 18 |
18 class ExceptionState; | 19 class ExceptionState; |
19 | 20 |
20 typedef USVStringOrURLSearchParams URLSearchParamsInit; | 21 typedef USVStringOrURLSearchParams URLSearchParamsInit; |
21 | 22 |
(...skipping 14 matching lines...) Expand all Loading... |
36 // URLSearchParams interface methods | 37 // URLSearchParams interface methods |
37 String toString() const; | 38 String toString() const; |
38 void append(const String& name, const String& value); | 39 void append(const String& name, const String& value); |
39 void deleteAllWithName(const String&); | 40 void deleteAllWithName(const String&); |
40 String get(const String&) const; | 41 String get(const String&) const; |
41 Vector<String> getAll(const String&) const; | 42 Vector<String> getAll(const String&) const; |
42 bool has(const String&) const; | 43 bool has(const String&) const; |
43 void set(const String& name, const String& value); | 44 void set(const String& name, const String& value); |
44 void setInput(const String&); | 45 void setInput(const String&); |
45 | 46 |
| 47 // Internal helpers |
| 48 PassRefPtr<EncodedFormData> encodeFormData() const; |
| 49 |
46 DECLARE_TRACE(); | 50 DECLARE_TRACE(); |
47 | 51 |
48 private: | 52 private: |
| 53 friend class URLSearchParamsTest_EncodedFormData_Test; |
| 54 |
49 explicit URLSearchParams(const String&); | 55 explicit URLSearchParams(const String&); |
50 explicit URLSearchParams(URLSearchParams*); | 56 explicit URLSearchParams(URLSearchParams*); |
51 Vector<std::pair<String, String>> m_params; | 57 Vector<std::pair<String, String>> m_params; |
52 | 58 |
53 IterationSource* startIteration(ScriptState*, ExceptionState&) override; | 59 IterationSource* startIteration(ScriptState*, ExceptionState&) override; |
54 }; | 60 }; |
55 | 61 |
56 } // namespace blink | 62 } // namespace blink |
57 | 63 |
58 #endif // URLSearchParams_h | 64 #endif // URLSearchParams_h |
OLD | NEW |