OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2011, 2012 Apple Inc. All r
ights reserved. | 2 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2011, 2012 Apple Inc. All r
ights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
131 | 131 |
132 // Returns true if the current URL's protocol is the same as the null- | 132 // Returns true if the current URL's protocol is the same as the null- |
133 // terminated ASCII argument. The argument must be lower-case. | 133 // terminated ASCII argument. The argument must be lower-case. |
134 bool protocolIs(const char*) const; | 134 bool protocolIs(const char*) const; |
135 bool protocolIsData() const { return protocolIs("data"); } | 135 bool protocolIsData() const { return protocolIs("data"); } |
136 // This includes at least about:blank and about:srcdoc. | 136 // This includes at least about:blank and about:srcdoc. |
137 bool protocolIsAbout() const { return protocolIs("about"); } | 137 bool protocolIsAbout() const { return protocolIs("about"); } |
138 bool protocolIsInHTTPFamily() const; | 138 bool protocolIsInHTTPFamily() const; |
139 bool isLocalFile() const; | 139 bool isLocalFile() const; |
140 bool isAboutBlankURL() const; // Is exactly about:blank. | 140 bool isAboutBlankURL() const; // Is exactly about:blank. |
| 141 bool isAboutSrcdocURL() const; // Is exactly about:srcdoc. |
141 | 142 |
142 bool setProtocol(const String&); | 143 bool setProtocol(const String&); |
143 void setHost(const String&); | 144 void setHost(const String&); |
144 | 145 |
145 void removePort(); | 146 void removePort(); |
146 void setPort(unsigned short); | 147 void setPort(unsigned short); |
147 void setPort(const String&); | 148 void setPort(const String&); |
148 | 149 |
149 // Input is like "foo.com" or "foo.com:8000". | 150 // Input is like "foo.com" or "foo.com:8000". |
150 void setHostAndPort(const String&); | 151 void setHostAndPort(const String&); |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
205 PLATFORM_EXPORT bool operator==(const KURL&, const KURL&); | 206 PLATFORM_EXPORT bool operator==(const KURL&, const KURL&); |
206 PLATFORM_EXPORT bool operator==(const KURL&, const String&); | 207 PLATFORM_EXPORT bool operator==(const KURL&, const String&); |
207 PLATFORM_EXPORT bool operator==(const String&, const KURL&); | 208 PLATFORM_EXPORT bool operator==(const String&, const KURL&); |
208 PLATFORM_EXPORT bool operator!=(const KURL&, const KURL&); | 209 PLATFORM_EXPORT bool operator!=(const KURL&, const KURL&); |
209 PLATFORM_EXPORT bool operator!=(const KURL&, const String&); | 210 PLATFORM_EXPORT bool operator!=(const KURL&, const String&); |
210 PLATFORM_EXPORT bool operator!=(const String&, const KURL&); | 211 PLATFORM_EXPORT bool operator!=(const String&, const KURL&); |
211 | 212 |
212 PLATFORM_EXPORT bool equalIgnoringFragmentIdentifier(const KURL&, const KURL&); | 213 PLATFORM_EXPORT bool equalIgnoringFragmentIdentifier(const KURL&, const KURL&); |
213 | 214 |
214 PLATFORM_EXPORT const KURL& blankURL(); | 215 PLATFORM_EXPORT const KURL& blankURL(); |
| 216 PLATFORM_EXPORT const KURL& srcdocURL(); |
215 | 217 |
216 // Functions to do URL operations on strings. | 218 // Functions to do URL operations on strings. |
217 // These are operations that aren't faster on a parsed URL. | 219 // These are operations that aren't faster on a parsed URL. |
218 // These are also different from the KURL functions in that they don't require t
he string to be a valid and parsable URL. | 220 // These are also different from the KURL functions in that they don't require t
he string to be a valid and parsable URL. |
219 // This is especially important because valid javascript URLs are not necessaril
y considered valid by KURL. | 221 // This is especially important because valid javascript URLs are not necessaril
y considered valid by KURL. |
220 | 222 |
221 PLATFORM_EXPORT bool protocolIs(const String& url, const char* protocol); | 223 PLATFORM_EXPORT bool protocolIs(const String& url, const char* protocol); |
222 PLATFORM_EXPORT bool protocolIsJavaScript(const String& url); | 224 PLATFORM_EXPORT bool protocolIsJavaScript(const String& url); |
223 | 225 |
224 PLATFORM_EXPORT bool isValidProtocol(const String&); | 226 PLATFORM_EXPORT bool isValidProtocol(const String&); |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
268 namespace WTF { | 270 namespace WTF { |
269 | 271 |
270 // KURLHash is the default hash for String | 272 // KURLHash is the default hash for String |
271 template<> struct DefaultHash<blink::KURL> { | 273 template<> struct DefaultHash<blink::KURL> { |
272 typedef blink::KURLHash Hash; | 274 typedef blink::KURLHash Hash; |
273 }; | 275 }; |
274 | 276 |
275 } // namespace WTF | 277 } // namespace WTF |
276 | 278 |
277 #endif // KURL_h | 279 #endif // KURL_h |
OLD | NEW |