| 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 "platform/network/EncodedFormData.h" | 
| 13 #include "wtf/Forward.h" | 13 #include "wtf/Forward.h" | 
| 14 #include "wtf/text/WTFString.h" | 14 #include "wtf/text/WTFString.h" | 
|  | 15 #include <base/gtest_prod_util.h> | 
| 15 #include <utility> | 16 #include <utility> | 
| 16 | 17 | 
| 17 namespace blink { | 18 namespace blink { | 
| 18 | 19 | 
| 19 class ExceptionState; | 20 class ExceptionState; | 
| 20 | 21 | 
| 21 typedef USVStringOrURLSearchParams URLSearchParamsInit; | 22 typedef USVStringOrURLSearchParams URLSearchParamsInit; | 
| 22 | 23 | 
| 23 class CORE_EXPORT URLSearchParams final : public GarbageCollectedFinalized<URLSe
    archParams>, public ScriptWrappable, public PairIterable<String, String> { | 24 class CORE_EXPORT URLSearchParams final : public GarbageCollectedFinalized<URLSe
    archParams>, public ScriptWrappable, public PairIterable<String, String> { | 
| 24     DEFINE_WRAPPERTYPEINFO(); | 25     DEFINE_WRAPPERTYPEINFO(); | 
| (...skipping 19 matching lines...) Expand all  Loading... | 
| 44     void set(const String& name, const String& value); | 45     void set(const String& name, const String& value); | 
| 45     void setInput(const String&); | 46     void setInput(const String&); | 
| 46 | 47 | 
| 47     // Internal helpers | 48     // Internal helpers | 
| 48     PassRefPtr<EncodedFormData> encodeFormData() const; | 49     PassRefPtr<EncodedFormData> encodeFormData() const; | 
| 49     const Vector<std::pair<String, String>>& params() const { return m_params; } | 50     const Vector<std::pair<String, String>>& params() const { return m_params; } | 
| 50 | 51 | 
| 51     DECLARE_TRACE(); | 52     DECLARE_TRACE(); | 
| 52 | 53 | 
| 53 private: | 54 private: | 
| 54     friend class URLSearchParamsTest_EncodedFormData_Test; | 55     FRIEND_TEST_ALL_PREFIXES(URLSearchParamsTest, EncodedFormData); | 
| 55 | 56 | 
| 56     explicit URLSearchParams(const String&); | 57     explicit URLSearchParams(const String&); | 
| 57     explicit URLSearchParams(URLSearchParams*); | 58     explicit URLSearchParams(URLSearchParams*); | 
| 58     Vector<std::pair<String, String>> m_params; | 59     Vector<std::pair<String, String>> m_params; | 
| 59 | 60 | 
| 60     IterationSource* startIteration(ScriptState*, ExceptionState&) override; | 61     IterationSource* startIteration(ScriptState*, ExceptionState&) override; | 
| 61 }; | 62 }; | 
| 62 | 63 | 
| 63 } // namespace blink | 64 } // namespace blink | 
| 64 | 65 | 
| 65 #endif // URLSearchParams_h | 66 #endif // URLSearchParams_h | 
| OLD | NEW | 
|---|