OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 // Multiply-included message file, no traditional include guard. |
| 6 #include "googleurl/src/gurl.h" |
| 7 #include "ipc/ipc_message.h" |
| 8 #include "ipc/ipc_message_macros.h" |
| 9 #include "ipc/ipc_param_traits.h" |
| 10 |
| 11 // TODO : Pull ViewHostMsg_UpdateFaviconURL into this file |
| 12 |
| 13 #ifndef CHROME_COMMON_ICON_MESSAGES_H__ |
| 14 #define CHROME_COMMON_ICON_MESSAGES_H__ |
| 15 |
| 16 // The icon type in a page. The definition must be same as history::IconType. |
| 17 enum IconType { |
| 18 INVALID_ICON = 0x0, |
| 19 FAVICON = 1 << 0, |
| 20 TOUCH_ICON = 1 << 1, |
| 21 TOUCH_PRECOMPOSED_ICON = 1 << 2 |
| 22 }; |
| 23 |
| 24 // The favicon url from the render. |
| 25 struct FaviconURL { |
| 26 FaviconURL(); |
| 27 FaviconURL(const GURL& url, IconType type); |
| 28 ~FaviconURL(); |
| 29 |
| 30 // The url of the icon. |
| 31 GURL icon_url; |
| 32 |
| 33 // The type of the icon |
| 34 IconType icon_type; |
| 35 }; |
| 36 |
| 37 namespace IPC { |
| 38 |
| 39 template <> |
| 40 struct ParamTraits<IconType> { |
| 41 typedef IconType param_type; |
| 42 static void Write(Message* m, const param_type& p); |
| 43 static bool Read(const Message* m, void** iter, param_type* p); |
| 44 static void Log(const param_type& p, std::string* l); |
| 45 }; |
| 46 |
| 47 template <> |
| 48 struct ParamTraits<FaviconURL> { |
| 49 typedef FaviconURL param_type; |
| 50 static void Write(Message* m, const param_type& p); |
| 51 static bool Read(const Message* m, void** iter, param_type* p); |
| 52 static void Log(const param_type& p, std::string* l); |
| 53 }; |
| 54 |
| 55 } // namespace IPC |
| 56 |
| 57 #endif // CHROME_COMMON_ICON_MESSAGES_H__ |
OLD | NEW |