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..2bb8215077446e552f13992c812619f06e5cdcf5 |
--- /dev/null |
+++ b/Source/core/dom/DOMURLSearchParams.h |
@@ -0,0 +1,65 @@ |
+// 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/core/v8/ScriptWrappable.h" |
+#include "platform/heap/Handle.h" |
+#include "wtf/Forward.h" |
+#include "wtf/text/WTFString.h" |
+#include <utility> |
+ |
+namespace blink { |
+ |
+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(); |
+ |
+ // URLSearchParams interface methods |
+ String toString() const; |
+ void append(const String& name, const String& value); |
+ void deleteAllWithName(const String&); |
+ String get(const String&) const; |
+ Vector<String> getAll(const String&) const; |
+ bool has(const String&) const; |
+ void set(const String& name, const String& value); |
+ |
+ void setInput(const String&); |
+ |
+ void dropURLObject(DOMURLUtils*); |
+ void addURLObject(DOMURLUtils*); |
+#if ENABLE(ASSERT) |
+ 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; |
+ WillBeHeapVector<RawPtrWillBeMember<DOMURLUtils> > m_urlObjects; |
+ bool m_isUpdating; |
+}; |
+ |
+} // namespace blink |
+ |
+#endif // DOMURLSearchParams_h |