Index: Source/core/dom/DOMURLUtils.h |
diff --git a/Source/core/dom/DOMURLUtils.h b/Source/core/dom/DOMURLUtils.h |
index 1987ecd72054e349d44a522bd9b4a50143f0e906..e1d2670bf1ac4174fc528c833b4e65ebedbb37a0 100644 |
--- a/Source/core/dom/DOMURLUtils.h |
+++ b/Source/core/dom/DOMURLUtils.h |
@@ -27,8 +27,10 @@ |
#ifndef DOMURLUtils_h |
#define DOMURLUtils_h |
+#include "core/dom/DOMURLSearchParams.h" |
#include "core/dom/DOMURLUtilsReadOnly.h" |
#include "wtf/Forward.h" |
+#include "wtf/RefPtr.h" |
Inactive
2014/01/21 15:25:58
You're using an OwnPtr, not a RefPtr.
|
#include "wtf/text/WTFString.h" |
namespace WebCore { |
@@ -52,6 +54,38 @@ public: |
static void setPathname(DOMURLUtils*, const String&); |
static void setSearch(DOMURLUtils*, const String&); |
static void setHash(DOMURLUtils*, const String&); |
+ |
+ static DOMURLSearchParams* searchParams(DOMURLUtils*, bool&); |
+ static void setSearchParams(DOMURLUtils*, const String&); |
+ static void setSearchParams(DOMURLUtils*, DOMURLSearchParams*); |
+ |
+ static void update(DOMURLUtils*); |
+ |
+ // To correctly record object dependencies during GCs, we have to |
+ // map from a URLSearchParams' url object (a DOMURLUtils pointer) |
+ // to its corresponding wrapper object - the wrapper object for |
+ // the concrete type implementing the URLUtils interface. |
+ // |
+ // Indirectly (and pragmatically) express such type discovery via |
+ // an enum. If the URLUtils interface is implemented by another |
+ // object, and it doesn't fit with one of the below, the type will |
+ // have to be extended. (Along with the custom wrapper function |
+ // that considers its value.) |
+ enum ImplementedBy { |
+ Anchor, // derives from HTMLAnchorElement |
+ DomURL |
+ }; |
+ |
+ virtual ImplementedBy implementedBy() const = 0; |
+ |
+protected: |
+ static void createSearchParams(DOMURLUtils*, const String&); |
+ |
+ friend class DOMURLSearchParams; |
+ virtual void refURLUtils() = 0; |
+ virtual void derefURLUtils() = 0; |
+ |
+ OwnPtr<DOMURLSearchParams> m_searchParams; |
}; |
} // namespace WebCore |