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 } |
55 | 57 |
56 static String createObjectURL(ExecutionContext*, Blob*, ExceptionState&); | 58 static String createObjectURL(ExecutionContext*, Blob*, ExceptionState&); |
57 static void revokeObjectURL(ExecutionContext*, const String&); | 59 static void revokeObjectURL(ExecutionContext*, const String&); |
58 | 60 |
59 CORE_EXPORT static String createPublicURL(ExecutionContext*, URLRegistrable*
, const String& uuid = String()); | 61 CORE_EXPORT static String createPublicURL(ExecutionContext*, URLRegistrable*
, const String& uuid = String()); |
60 static void revokeObjectUUID(ExecutionContext*, const String&); | 62 static void revokeObjectUUID(ExecutionContext*, const String&); |
61 | 63 |
62 KURL url() const override { return m_url; } | 64 KURL url() const override { return m_url; } |
63 void setURL(const KURL& url) override { m_url = url; } | 65 void setURL(const KURL& url) override { m_url = url; } |
64 | 66 |
65 String input() const override { return m_input; } | 67 String input() const override { return m_input; } |
66 void setInput(const String&) override; | 68 void setInput(const String&) override; |
67 | 69 |
68 DEFINE_INLINE_TRACE() { } | 70 void setSearch(const String&) override; |
| 71 |
| 72 URLSearchParams* searchParams(); |
| 73 |
| 74 DECLARE_VIRTUAL_TRACE(); |
69 | 75 |
70 private: | 76 private: |
| 77 friend class URLSearchParams; |
71 DOMURL(const String& url, const KURL& base, ExceptionState&); | 78 DOMURL(const String& url, const KURL& base, ExceptionState&); |
72 | 79 |
| 80 void update(); |
| 81 void updateSearchParams(const String&); |
| 82 |
73 KURL m_url; | 83 KURL m_url; |
74 String m_input; | 84 String m_input; |
| 85 WeakMember<URLSearchParams> m_searchParams; |
75 }; | 86 }; |
76 | 87 |
77 } // namespace blink | 88 } // namespace blink |
78 | 89 |
79 #endif // DOMURL_h | 90 #endif // DOMURL_h |
OLD | NEW |