Index: Source/core/dom/DOMURLSearchParams.h |
diff --git a/Source/core/dom/DOMURLSearchParams.h b/Source/core/dom/DOMURLSearchParams.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..173e78449cda3d7f61d0f3bb8b3f73922666ef52 |
--- /dev/null |
+++ b/Source/core/dom/DOMURLSearchParams.h |
@@ -0,0 +1,66 @@ |
+// Copyright 2014 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef DOMURLSearchParams_h |
+#define DOMURLSearchParams_h |
+ |
+#include "bindings/v8/ScriptWrappable.h" |
+#include "platform/heap/Handle.h" |
+#include "wtf/Forward.h" |
+#include "wtf/text/WTFString.h" |
+#include <utility> |
+ |
+namespace WebCore { |
+ |
+class DOMURLUtils; |
+class ExceptionState; |
+ |
+class DOMURLSearchParams FINAL : public GarbageCollectedFinalized<DOMURLSearchParams>, public ScriptWrappable { |
+public: |
+ static DOMURLSearchParams* create(const String& queryString = String(), DOMURLUtils* urlObject = 0) |
+ { |
+ return new DOMURLSearchParams(queryString, urlObject); |
+ } |
+ |
+ static DOMURLSearchParams* create(DOMURLSearchParams* searchParams, DOMURLUtils* urlObject = 0) |
+ { |
+ return new DOMURLSearchParams(searchParams, urlObject); |
+ } |
+ |
+ virtual ~DOMURLSearchParams(); |
+ |
+ String toString() const; |
+ |
+ void appendNameValue(const String& name, const String& value); |
+ void deleteAllWithName(const String&); |
+ String getFirstValue(const String&) const; |
+ |
+ Vector<String> getAllValues(const String&) const; |
+ bool hasName(const String&) const; |
+ void setNameValue(const String& name, const String& value); |
+ |
+ void setInput(const String&); |
+ |
+ void dropURLObject(DOMURLUtils*); |
+ void addURLObject(DOMURLUtils*); |
+#if ASSERT_ENABLED |
+ bool hasURLObject(DOMURLUtils*) const; |
+#endif |
+ |
+ void trace(Visitor*); |
+ |
+private: |
+ DOMURLSearchParams(const String&, DOMURLUtils*); |
+ DOMURLSearchParams(DOMURLSearchParams*, DOMURLUtils*); |
+ |
+ void runUpdateSteps(); |
+ |
+ Vector<std::pair<String, String> > m_params; |
+ HeapVector<Member<DOMURLUtils> > m_urlObjects; |
+ bool m_isUpdating; |
+}; |
+ |
+} // namespace WebCore |
+ |
+#endif // DOMURLSearchParams_h |