Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(629)

Unified Diff: Source/core/html/DOMURL.h

Issue 24066010: Implement URLUtils and URL interface (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: git rebase Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/core/html/DOMURL.h
diff --git a/Source/core/html/DOMURL.h b/Source/core/html/DOMURL.h
index a3784de69e5db10db6cd870aecb8ded94829b105..4307957e47cb132373d5d9767ae332cf870ff0eb 100644
--- a/Source/core/html/DOMURL.h
+++ b/Source/core/html/DOMURL.h
@@ -27,25 +27,54 @@
#ifndef DOMURL_h
#define DOMURL_h
+#include "bindings/v8/ScriptWrappable.h"
+#include "core/html/DOMURLUtils.h"
+#include "weborigin/KURL.h"
#include "wtf/Forward.h"
#include "wtf/PassRefPtr.h"
#include "wtf/RefCounted.h"
+#include "wtf/text/WTFString.h"
namespace WebCore {
class Blob;
+class ExceptionState;
class ScriptExecutionContext;
class URLRegistrable;
-class DOMURL : public RefCounted<DOMURL> {
+class DOMURL : public ScriptWrappable, public DOMURLUtils, public RefCounted<DOMURL> {
public:
- static PassRefPtr<DOMURL> create() { return adoptRef(new DOMURL); }
+ static PassRefPtr<DOMURL> create(const String& url, ExceptionState& es)
+ {
+ return adoptRef(new DOMURL(url, blankURL(), es));
+ }
+ static PassRefPtr<DOMURL> create(const String& url, const String& base, ExceptionState& es)
+ {
+ return adoptRef(new DOMURL(url, KURL(KURL(), base), es));
+ }
+ static PassRefPtr<DOMURL> create(const String& url, PassRefPtr<DOMURL> base, ExceptionState& es)
+ {
+ ASSERT(base);
+ return adoptRef(new DOMURL(url, base->m_url, es));
+ }
static String createObjectURL(ScriptExecutionContext*, Blob*);
static void revokeObjectURL(ScriptExecutionContext*, const String&);
static String createPublicURL(ScriptExecutionContext*, URLRegistrable*);
+
+ virtual KURL url() const { return m_url; }
+ virtual void setURL(const KURL& url) { m_url = url; }
+
+ virtual String input() const { return m_input; }
+ virtual void setInput(const String&);
abarth-chromium 2013/10/10 04:17:34 Can you mark these four functions as OVERRIDE?
arv (Not doing code reviews) 2013/10/10 13:03:13 Done.
+
+private:
+ DOMURL(const String& url, const KURL& base, ExceptionState&);
+
+ KURL m_url;
+ String m_input;
};
} // namespace WebCore

Powered by Google App Engine
This is Rietveld 408576698