| 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 27 matching lines...) Expand all Loading... |
| 38 namespace blink { | 38 namespace blink { |
| 39 | 39 |
| 40 enum IconType { | 40 enum IconType { |
| 41 InvalidIcon = 0, | 41 InvalidIcon = 0, |
| 42 Favicon = 1, | 42 Favicon = 1, |
| 43 TouchIcon = 1 << 1, | 43 TouchIcon = 1 << 1, |
| 44 TouchPrecomposedIcon = 1 << 2, | 44 TouchPrecomposedIcon = 1 << 2, |
| 45 }; | 45 }; |
| 46 | 46 |
| 47 struct IconURL { | 47 struct IconURL { |
| 48 ALLOW_ONLY_INLINE_ALLOCATION(); | 48 DISALLOW_NEW_EXCEPT_PLACEMENT_NEW(); |
| 49 IconType m_iconType; | 49 IconType m_iconType; |
| 50 Vector<IntSize> m_sizes; | 50 Vector<IntSize> m_sizes; |
| 51 String m_mimeType; | 51 String m_mimeType; |
| 52 KURL m_iconURL; | 52 KURL m_iconURL; |
| 53 bool m_isDefaultIcon; | 53 bool m_isDefaultIcon; |
| 54 | 54 |
| 55 IconURL() | 55 IconURL() |
| 56 : m_iconType(InvalidIcon) | 56 : m_iconType(InvalidIcon) |
| 57 , m_isDefaultIcon(false) | 57 , m_isDefaultIcon(false) |
| 58 { | 58 { |
| 59 } | 59 } |
| 60 | 60 |
| 61 IconURL(const KURL& url, const Vector<IntSize>& sizes, const String& mimeTyp
e, IconType type) | 61 IconURL(const KURL& url, const Vector<IntSize>& sizes, const String& mimeTyp
e, IconType type) |
| 62 : m_iconType(type) | 62 : m_iconType(type) |
| 63 , m_sizes(sizes) | 63 , m_sizes(sizes) |
| 64 , m_mimeType(mimeType) | 64 , m_mimeType(mimeType) |
| 65 , m_iconURL(url) | 65 , m_iconURL(url) |
| 66 , m_isDefaultIcon(false) | 66 , m_isDefaultIcon(false) |
| 67 { | 67 { |
| 68 } | 68 } |
| 69 | 69 |
| 70 static IconURL defaultFavicon(const KURL&); | 70 static IconURL defaultFavicon(const KURL&); |
| 71 }; | 71 }; |
| 72 | 72 |
| 73 bool operator==(const IconURL&, const IconURL&); | 73 bool operator==(const IconURL&, const IconURL&); |
| 74 | 74 |
| 75 } | 75 } |
| 76 | 76 |
| 77 #endif // IconURL_h | 77 #endif // IconURL_h |
| OLD | NEW |