OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef DOMURLSearchParams_h |
| 6 #define DOMURLSearchParams_h |
| 7 |
| 8 #include "bindings/v8/ScriptWrappable.h" |
| 9 #include "platform/heap/Handle.h" |
| 10 #include "wtf/Forward.h" |
| 11 #include "wtf/text/WTFString.h" |
| 12 #include <utility> |
| 13 |
| 14 namespace WebCore { |
| 15 |
| 16 class DOMURLUtils; |
| 17 class ExceptionState; |
| 18 |
| 19 class DOMURLSearchParams FINAL : public GarbageCollectedFinalized<DOMURLSearchPa
rams>, public ScriptWrappable { |
| 20 public: |
| 21 static DOMURLSearchParams* create(const String& queryString = String(), DOMU
RLUtils* urlObject = 0) |
| 22 { |
| 23 return new DOMURLSearchParams(queryString, urlObject); |
| 24 } |
| 25 |
| 26 static DOMURLSearchParams* create(DOMURLSearchParams* searchParams, DOMURLUt
ils* urlObject = 0) |
| 27 { |
| 28 return new DOMURLSearchParams(searchParams, urlObject); |
| 29 } |
| 30 |
| 31 virtual ~DOMURLSearchParams(); |
| 32 |
| 33 String toString() const; |
| 34 |
| 35 void appendNameValue(const String& name, const String& value); |
| 36 void deleteAllWithName(const String&); |
| 37 String getFirstValue(const String&) const; |
| 38 |
| 39 Vector<String> getAllValues(const String&) const; |
| 40 bool hasName(const String&) const; |
| 41 void setNameValue(const String& name, const String& value); |
| 42 |
| 43 void setInput(const String&); |
| 44 |
| 45 void dropURLObject(DOMURLUtils*); |
| 46 void addURLObject(DOMURLUtils*); |
| 47 #if ASSERT_ENABLED |
| 48 bool hasURLObject(DOMURLUtils*) const; |
| 49 #endif |
| 50 |
| 51 void trace(Visitor*); |
| 52 |
| 53 private: |
| 54 DOMURLSearchParams(const String&, DOMURLUtils*); |
| 55 DOMURLSearchParams(DOMURLSearchParams*, DOMURLUtils*); |
| 56 |
| 57 void runUpdateSteps(); |
| 58 |
| 59 Vector<std::pair<String, String> > m_params; |
| 60 HeapVector<Member<DOMURLUtils> > m_urlObjects; |
| 61 bool m_isUpdating; |
| 62 }; |
| 63 |
| 64 } // namespace WebCore |
| 65 |
| 66 #endif // DOMURLSearchParams_h |
OLD | NEW |