| 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 22 matching lines...) Expand all Loading... |
| 33 #include "platform/heap/Handle.h" | 33 #include "platform/heap/Handle.h" |
| 34 #include "platform/weborigin/KURL.h" | 34 #include "platform/weborigin/KURL.h" |
| 35 #include "wtf/Forward.h" | 35 #include "wtf/Forward.h" |
| 36 | 36 |
| 37 namespace blink { | 37 namespace blink { |
| 38 | 38 |
| 39 class Blob; | 39 class Blob; |
| 40 class ExceptionState; | 40 class ExceptionState; |
| 41 class ExecutionContext; | 41 class ExecutionContext; |
| 42 class URLRegistrable; | 42 class URLRegistrable; |
| 43 class URLSearchParams; |
| 43 | 44 |
| 44 class DOMURL final : public GarbageCollectedFinalized<DOMURL>, public ScriptWrap
pable, public DOMURLUtils { | 45 class DOMURL final : public GarbageCollectedFinalized<DOMURL>, public ScriptWrap
pable, public DOMURLUtils { |
| 45 DEFINE_WRAPPERTYPEINFO(); | 46 DEFINE_WRAPPERTYPEINFO(); |
| 46 public: | 47 public: |
| 47 static DOMURL* create(const String& url, ExceptionState& exceptionState) | 48 static DOMURL* create(const String& url, ExceptionState& exceptionState) |
| 48 { | 49 { |
| 49 return new DOMURL(url, blankURL(), exceptionState); | 50 return new DOMURL(url, blankURL(), exceptionState); |
| 50 } | 51 } |
| 52 |
| 51 static DOMURL* create(const String& url, const String& base, ExceptionState&
exceptionState) | 53 static DOMURL* create(const String& url, const String& base, ExceptionState&
exceptionState) |
| 52 { | 54 { |
| 53 return new DOMURL(url, KURL(KURL(), base), exceptionState); | 55 return new DOMURL(url, KURL(KURL(), base), exceptionState); |
| 54 } | 56 } |
| 57 ~DOMURL(); |
| 55 | 58 |
| 56 static String createObjectURL(ExecutionContext*, Blob*, ExceptionState&); | 59 static String createObjectURL(ExecutionContext*, Blob*, ExceptionState&); |
| 57 static void revokeObjectURL(ExecutionContext*, const String&); | 60 static void revokeObjectURL(ExecutionContext*, const String&); |
| 58 | 61 |
| 59 CORE_EXPORT static String createPublicURL(ExecutionContext*, URLRegistrable*
, const String& uuid = String()); | 62 CORE_EXPORT static String createPublicURL(ExecutionContext*, URLRegistrable*
, const String& uuid = String()); |
| 60 static void revokeObjectUUID(ExecutionContext*, const String&); | 63 static void revokeObjectUUID(ExecutionContext*, const String&); |
| 61 | 64 |
| 62 KURL url() const override { return m_url; } | 65 KURL url() const override { return m_url; } |
| 63 void setURL(const KURL& url) override { m_url = url; } | 66 void setURL(const KURL& url) override { m_url = url; } |
| 64 | 67 |
| 65 String input() const override { return m_input; } | 68 String input() const override { return m_input; } |
| 66 void setInput(const String&) override; | 69 void setInput(const String&) override; |
| 67 | 70 |
| 68 DEFINE_INLINE_TRACE() { } | 71 void setSearch(const String&) override; |
| 72 |
| 73 URLSearchParams* searchParams(); |
| 74 |
| 75 DECLARE_VIRTUAL_TRACE(); |
| 69 | 76 |
| 70 private: | 77 private: |
| 78 friend class URLSearchParams; |
| 71 DOMURL(const String& url, const KURL& base, ExceptionState&); | 79 DOMURL(const String& url, const KURL& base, ExceptionState&); |
| 72 | 80 |
| 81 void update(); |
| 82 void updateSearchParams(const String&); |
| 83 |
| 73 KURL m_url; | 84 KURL m_url; |
| 74 String m_input; | 85 String m_input; |
| 86 WeakMember<URLSearchParams> m_searchParams; |
| 75 }; | 87 }; |
| 76 | 88 |
| 77 } // namespace blink | 89 } // namespace blink |
| 78 | 90 |
| 79 #endif // DOMURL_h | 91 #endif // DOMURL_h |
| OLD | NEW |