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/USVStringOrURLSearchParams.h" | 10 #include "bindings/core/v8/USVStringOrURLSearchParams.h" |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 String get(const String&) const; | 45 String get(const String&) const; |
46 Vector<String> getAll(const String&) const; | 46 Vector<String> getAll(const String&) const; |
47 bool has(const String&) const; | 47 bool has(const String&) const; |
48 void set(const String& name, const String& value); | 48 void set(const String& name, const String& value); |
49 void setInput(const String&); | 49 void setInput(const String&); |
50 | 50 |
51 // Internal helpers | 51 // Internal helpers |
52 PassRefPtr<EncodedFormData> toEncodedFormData() const; | 52 PassRefPtr<EncodedFormData> toEncodedFormData() const; |
53 const Vector<std::pair<String, String>>& params() const { return m_params; } | 53 const Vector<std::pair<String, String>>& params() const { return m_params; } |
54 | 54 |
55 #if ENABLE(ASSERT) | 55 #if DCHECK_IS_ON() |
56 DOMURL* urlObject() const; | 56 DOMURL* urlObject() const; |
57 #endif | 57 #endif |
58 | 58 |
59 DECLARE_TRACE(); | 59 DECLARE_TRACE(); |
60 | 60 |
61 private: | 61 private: |
62 FRIEND_TEST_ALL_PREFIXES(URLSearchParamsTest, EncodedFormData); | 62 FRIEND_TEST_ALL_PREFIXES(URLSearchParamsTest, EncodedFormData); |
63 | 63 |
64 explicit URLSearchParams(const String&, DOMURL* = nullptr); | 64 explicit URLSearchParams(const String&, DOMURL* = nullptr); |
65 explicit URLSearchParams(URLSearchParams*); | 65 explicit URLSearchParams(URLSearchParams*); |
66 | 66 |
67 void runUpdateSteps(); | 67 void runUpdateSteps(); |
68 IterationSource* startIteration(ScriptState*, ExceptionState&) override; | 68 IterationSource* startIteration(ScriptState*, ExceptionState&) override; |
69 void encodeAsFormData(Vector<char>&) const; | 69 void encodeAsFormData(Vector<char>&) const; |
70 | 70 |
71 Vector<std::pair<String, String>> m_params; | 71 Vector<std::pair<String, String>> m_params; |
72 | 72 |
73 WeakMember<DOMURL> m_urlObject; | 73 WeakMember<DOMURL> m_urlObject; |
74 }; | 74 }; |
75 | 75 |
76 } // namespace blink | 76 } // namespace blink |
77 | 77 |
78 #endif // URLSearchParams_h | 78 #endif // URLSearchParams_h |
OLD | NEW |