summaryrefslogtreecommitdiff
path: root/Source/WebCore/html/DOMURL.h
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebCore/html/DOMURL.h')
-rw-r--r--Source/WebCore/html/DOMURL.h40
1 files changed, 24 insertions, 16 deletions
diff --git a/Source/WebCore/html/DOMURL.h b/Source/WebCore/html/DOMURL.h
index 7d214d1cb..10a7f7070 100644
--- a/Source/WebCore/html/DOMURL.h
+++ b/Source/WebCore/html/DOMURL.h
@@ -24,36 +24,44 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef DOMURL_h
-#define DOMURL_h
+#pragma once
+#include "ExceptionOr.h"
#include "URL.h"
+#include "URLUtils.h"
#include <wtf/HashSet.h>
-#include <wtf/PassRefPtr.h>
-#include <wtf/RefCounted.h>
-#include <wtf/text/WTFString.h>
namespace WebCore {
class Blob;
class ScriptExecutionContext;
class URLRegistrable;
+class URLSearchParams;
-class DOMURL : public RefCounted<DOMURL> {
-
+class DOMURL : public RefCounted<DOMURL>, public URLUtils<DOMURL> {
public:
- static PassRefPtr<DOMURL> create() { return adoptRef(new DOMURL); }
+ static ExceptionOr<Ref<DOMURL>> create(const String& url, const String& base);
+ static ExceptionOr<Ref<DOMURL>> create(const String& url, const DOMURL& base);
+ static ExceptionOr<Ref<DOMURL>> create(const String& url);
+ ~DOMURL();
+
+ URL href() const { return m_url; }
+ ExceptionOr<void> setHref(const String& url);
+ void setQuery(const String&);
+
+ URLSearchParams& searchParams();
-#if ENABLE(BLOB)
- static void contextDestroyed(ScriptExecutionContext*);
+ static String createObjectURL(ScriptExecutionContext&, Blob&);
+ static void revokeObjectURL(ScriptExecutionContext&, const String&);
- static String createObjectURL(ScriptExecutionContext*, Blob*);
- static void revokeObjectURL(ScriptExecutionContext*, const String&);
+ static String createPublicURL(ScriptExecutionContext&, URLRegistrable&);
- static String createPublicURL(ScriptExecutionContext*, URLRegistrable*);
-#endif
+private:
+ DOMURL(URL&& completeURL, URL&& baseURL);
+
+ URL m_baseURL;
+ URL m_url;
+ RefPtr<URLSearchParams> m_searchParams;
};
} // namespace WebCore
-
-#endif // DOMURL_h