Chromium Code Reviews| 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 |