Index: Source/core/dom/DOMURLUtils.h |
diff --git a/Source/core/dom/DOMURLUtils.h b/Source/core/dom/DOMURLUtils.h |
index 6635c15e9c1e446aa137bfe014eb38dd50effa7e..e61cade0207be55d4a3fa5549b16ca35f2541330 100644 |
--- a/Source/core/dom/DOMURLUtils.h |
+++ b/Source/core/dom/DOMURLUtils.h |
@@ -27,18 +27,33 @@ |
#ifndef DOMURLUtils_h |
#define DOMURLUtils_h |
+#include "core/dom/DOMURLSearchParams.h" |
#include "core/dom/DOMURLUtilsReadOnly.h" |
+#include "platform/heap/Handle.h" |
#include "wtf/Forward.h" |
+#include "wtf/text/WTFString.h" |
+ |
+// FIXME: URLSearchParams depends on Oilpan, and it being used by |
+// default for Node-derived objects (for HTMLAnchorElement.) |
+// To enable testing before that is the case, use an ad-hoc |
+// #define to protect the parts we're unable to support without |
+// Oilpan. |
+#if ENABLE(OILPAN) |
+#define URLUTILS_SUPPORTS_SEARCHPARAMS 1 |
+#else |
+#define URLUTILS_SUPPORTS_SEARCHPARAMS 0 |
+#endif |
namespace blink { |
+class ExceptionState; |
class KURL; |
-class DOMURLUtils : public DOMURLUtilsReadOnly { |
+class DOMURLUtils : public DOMURLUtilsReadOnly, public WillBeGarbageCollectedMixin { |
public: |
virtual void setURL(const KURL&) = 0; |
virtual void setInput(const String&) = 0; |
- virtual ~DOMURLUtils() { }; |
+ virtual ~DOMURLUtils(); |
void setHref(const String&); |
@@ -51,6 +66,27 @@ public: |
void setPathname(const String&); |
void setSearch(const String&); |
void setHash(const String&); |
+ |
+ void update(); |
+ |
+ DOMURLSearchParams* searchParams(); |
+ void setSearchParams(DOMURLSearchParams*, ExceptionState&); |
+ |
+ virtual void trace(Visitor*); |
+ |
+protected: |
+ friend class DOMURLSearchParams; |
+ |
+ void createSearchParams(const String&); |
+ void updateSearchParams(const String&); |
+ |
+ void setQuery(const String&); |
+ |
+#if URLUTILS_SUPPORTS_SEARCHPARAMS |
+ // Weakly refer to the searchParams object, so that it can be |
+ // GCed if otherwise unused and unreferenced. |
+ WeakMember<DOMURLSearchParams> m_searchParams; |
+#endif |
}; |
} // namespace blink |