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 19 matching lines...) Expand all Loading... |
30 #include "weborigin/KURL.h" | 30 #include "weborigin/KURL.h" |
31 #include "wtf/Forward.h" | 31 #include "wtf/Forward.h" |
32 #include "wtf/text/WTFString.h" | 32 #include "wtf/text/WTFString.h" |
33 | 33 |
34 namespace WebCore { | 34 namespace WebCore { |
35 | 35 |
36 class DOMURLUtilsReadOnly { | 36 class DOMURLUtilsReadOnly { |
37 public: | 37 public: |
38 virtual KURL url() const = 0; | 38 virtual KURL url() const = 0; |
39 virtual String input() const = 0; | 39 virtual String input() const = 0; |
| 40 virtual ~DOMURLUtilsReadOnly() { }; |
40 | 41 |
41 static String href(DOMURLUtilsReadOnly*); | 42 static String href(DOMURLUtilsReadOnly*); |
42 | 43 |
43 static String origin(const KURL&); | 44 static String origin(const KURL&); |
44 static String origin(DOMURLUtilsReadOnly* impl) { return origin(impl->url())
; } | 45 static String origin(DOMURLUtilsReadOnly* impl) { return origin(impl->url())
; } |
45 | 46 |
46 static String protocol(const KURL& url) { return url.protocol() + ":"; } | 47 static String protocol(const KURL& url) { return url.protocol() + ":"; } |
47 static String protocol(DOMURLUtilsReadOnly* impl) { return protocol(impl->ur
l()); } | 48 static String protocol(DOMURLUtilsReadOnly* impl) { return protocol(impl->ur
l()); } |
48 | 49 |
49 static String username(const KURL& url) { return url.user(); } | 50 static String username(const KURL& url) { return url.user(); } |
(...skipping 17 matching lines...) Expand all Loading... |
67 static String search(const KURL&); | 68 static String search(const KURL&); |
68 static String search(DOMURLUtilsReadOnly* impl) { return search(impl->url())
; } | 69 static String search(DOMURLUtilsReadOnly* impl) { return search(impl->url())
; } |
69 | 70 |
70 static String hash(const KURL&); | 71 static String hash(const KURL&); |
71 static String hash(DOMURLUtilsReadOnly* impl) { return hash(impl->url()); } | 72 static String hash(DOMURLUtilsReadOnly* impl) { return hash(impl->url()); } |
72 }; | 73 }; |
73 | 74 |
74 } // namespace WebCore | 75 } // namespace WebCore |
75 | 76 |
76 #endif // DOMURLUtilsReadOnly_h | 77 #endif // DOMURLUtilsReadOnly_h |
OLD | NEW |