| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 Google Inc. All rights 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 are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | 24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
| 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
| 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 29 */ | 29 */ |
| 30 | 30 |
| 31 #ifndef IconURL_h | 31 #ifndef IconURL_h |
| 32 #define IconURL_h | 32 #define IconURL_h |
| 33 | 33 |
| 34 #include "platform/geometry/IntSize.h" |
| 34 #include "platform/weborigin/KURL.h" | 35 #include "platform/weborigin/KURL.h" |
| 35 | 36 |
| 36 namespace WebCore { | 37 namespace WebCore { |
| 37 | 38 |
| 38 enum IconType { | 39 enum IconType { |
| 39 InvalidIcon = 0, | 40 InvalidIcon = 0, |
| 40 Favicon = 1, | 41 Favicon = 1, |
| 41 TouchIcon = 1 << 1, | 42 TouchIcon = 1 << 1, |
| 42 TouchPrecomposedIcon = 1 << 2, | 43 TouchPrecomposedIcon = 1 << 2, |
| 43 }; | 44 }; |
| 44 | 45 |
| 45 struct IconURL { | 46 struct IconURL { |
| 46 IconType m_iconType; | 47 IconType m_iconType; |
| 47 String m_sizes; | 48 Vector<IntSize> m_sizes; |
| 48 String m_mimeType; | 49 String m_mimeType; |
| 49 KURL m_iconURL; | 50 KURL m_iconURL; |
| 50 bool m_isDefaultIcon; | 51 bool m_isDefaultIcon; |
| 51 | 52 |
| 52 IconURL() | 53 IconURL() |
| 53 : m_iconType(InvalidIcon) | 54 : m_iconType(InvalidIcon) |
| 54 , m_isDefaultIcon(false) | 55 , m_isDefaultIcon(false) |
| 55 { | 56 { |
| 56 } | 57 } |
| 57 | 58 |
| 58 IconURL(const KURL& url, const String& sizes, const String& mimeType, IconTy
pe type) | 59 IconURL(const KURL& url, const Vector<IntSize>& sizes, const String& mimeTyp
e, IconType type) |
| 59 : m_iconType(type) | 60 : m_iconType(type) |
| 60 , m_sizes(sizes) | 61 , m_sizes(sizes) |
| 61 , m_mimeType(mimeType) | 62 , m_mimeType(mimeType) |
| 62 , m_iconURL(url) | 63 , m_iconURL(url) |
| 63 , m_isDefaultIcon(false) | 64 , m_isDefaultIcon(false) |
| 64 { | 65 { |
| 65 } | 66 } |
| 66 | 67 |
| 67 static IconURL defaultFavicon(const KURL&); | 68 static IconURL defaultFavicon(const KURL&); |
| 68 }; | 69 }; |
| 69 | 70 |
| 70 bool operator==(const IconURL&, const IconURL&); | 71 bool operator==(const IconURL&, const IconURL&); |
| 71 | 72 |
| 72 } | 73 } |
| 73 | 74 |
| 74 #endif // IconURL_h | 75 #endif // IconURL_h |
| OLD | NEW |