| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 Google Inc. All rights reserved. |
| 3 * Copyright (C) 2012 Motorola Mobility Inc. | 3 * Copyright (C) 2012 Motorola Mobility Inc. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * | 8 * |
| 9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 27 matching lines...) Expand all Loading... |
| 38 namespace WebCore { | 38 namespace WebCore { |
| 39 | 39 |
| 40 class Blob; | 40 class Blob; |
| 41 class ExceptionState; | 41 class ExceptionState; |
| 42 class ExecutionContext; | 42 class ExecutionContext; |
| 43 class URLRegistrable; | 43 class URLRegistrable; |
| 44 | 44 |
| 45 class DOMURL FINAL : public ScriptWrappable, public DOMURLUtils, public RefCount
ed<DOMURL> { | 45 class DOMURL FINAL : public ScriptWrappable, public DOMURLUtils, public RefCount
ed<DOMURL> { |
| 46 | 46 |
| 47 public: | 47 public: |
| 48 static PassRefPtr<DOMURL> create(const String& url, ExceptionState& es) | 48 static PassRefPtr<DOMURL> create(const String& url, ExceptionState& exceptio
nState) |
| 49 { | 49 { |
| 50 return adoptRef(new DOMURL(url, blankURL(), es)); | 50 return adoptRef(new DOMURL(url, blankURL(), exceptionState)); |
| 51 } | 51 } |
| 52 static PassRefPtr<DOMURL> create(const String& url, const String& base, Exce
ptionState& es) | 52 static PassRefPtr<DOMURL> create(const String& url, const String& base, Exce
ptionState& exceptionState) |
| 53 { | 53 { |
| 54 return adoptRef(new DOMURL(url, KURL(KURL(), base), es)); | 54 return adoptRef(new DOMURL(url, KURL(KURL(), base), exceptionState)); |
| 55 } | 55 } |
| 56 static PassRefPtr<DOMURL> create(const String& url, PassRefPtr<DOMURL> base,
ExceptionState& es) | 56 static PassRefPtr<DOMURL> create(const String& url, PassRefPtr<DOMURL> base,
ExceptionState& exceptionState) |
| 57 { | 57 { |
| 58 ASSERT(base); | 58 ASSERT(base); |
| 59 return adoptRef(new DOMURL(url, base->m_url, es)); | 59 return adoptRef(new DOMURL(url, base->m_url, exceptionState)); |
| 60 } | 60 } |
| 61 | 61 |
| 62 static String createObjectURL(ExecutionContext*, Blob*); | 62 static String createObjectURL(ExecutionContext*, Blob*); |
| 63 static void revokeObjectURL(ExecutionContext*, const String&); | 63 static void revokeObjectURL(ExecutionContext*, const String&); |
| 64 | 64 |
| 65 static String createPublicURL(ExecutionContext*, URLRegistrable*); | 65 static String createPublicURL(ExecutionContext*, URLRegistrable*); |
| 66 | 66 |
| 67 virtual KURL url() const OVERRIDE { return m_url; } | 67 virtual KURL url() const OVERRIDE { return m_url; } |
| 68 virtual void setURL(const KURL& url) OVERRIDE { m_url = url; } | 68 virtual void setURL(const KURL& url) OVERRIDE { m_url = url; } |
| 69 | 69 |
| 70 virtual String input() const OVERRIDE { return m_input; } | 70 virtual String input() const OVERRIDE { return m_input; } |
| 71 virtual void setInput(const String&) OVERRIDE; | 71 virtual void setInput(const String&) OVERRIDE; |
| 72 | 72 |
| 73 private: | 73 private: |
| 74 DOMURL(const String& url, const KURL& base, ExceptionState&); | 74 DOMURL(const String& url, const KURL& base, ExceptionState&); |
| 75 | 75 |
| 76 KURL m_url; | 76 KURL m_url; |
| 77 String m_input; | 77 String m_input; |
| 78 }; | 78 }; |
| 79 | 79 |
| 80 } // namespace WebCore | 80 } // namespace WebCore |
| 81 | 81 |
| 82 #endif // DOMURL_h | 82 #endif // DOMURL_h |
| OLD | NEW |