OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // Multiply-included message file, no traditional include guard. | 5 // Multiply-included message file, no traditional include guard. |
6 #include <vector> | 6 #include <vector> |
7 | 7 |
8 #include "content/public/common/favicon_url.h" | |
9 #include "ipc/ipc_message.h" | 8 #include "ipc/ipc_message.h" |
10 #include "ipc/ipc_message_macros.h" | 9 #include "ipc/ipc_message_macros.h" |
11 #include "ipc/ipc_param_traits.h" | 10 #include "ipc/ipc_param_traits.h" |
12 #include "third_party/skia/include/core/SkBitmap.h" | 11 #include "third_party/skia/include/core/SkBitmap.h" |
13 | 12 |
14 #define IPC_MESSAGE_START IconMsgStart | 13 #define IPC_MESSAGE_START ImageMsgStart |
15 | |
16 IPC_ENUM_TRAITS(content::FaviconURL::IconType) | |
17 | |
18 IPC_STRUCT_TRAITS_BEGIN(content::FaviconURL) | |
19 IPC_STRUCT_TRAITS_MEMBER(icon_url) | |
20 IPC_STRUCT_TRAITS_MEMBER(icon_type) | |
21 IPC_STRUCT_TRAITS_END() | |
22 | 14 |
23 // Messages sent from the browser to the renderer. | 15 // Messages sent from the browser to the renderer. |
24 | 16 |
25 // Requests the renderer to download the specified favicon image, decode it, | 17 // Requests the renderer to download the specified image, decode it, |
26 // and send the image data back via IconHostMsg_DidDownloadFavicon. | 18 // and send the image data back via ImageHostMsg_DidDownloadImage. |
27 IPC_MESSAGE_ROUTED4(IconMsg_DownloadFavicon, | 19 IPC_MESSAGE_ROUTED4(ImageMsg_DownloadImage, |
28 int /* identifier for the request */, | 20 int /* identifier for the request */, |
29 GURL /* URL of the image */, | 21 GURL /* URL of the image */, |
30 bool /* is favicon (turn off cookies) */, | 22 bool /* is favicon (turn off cookies) */, |
31 int /* Preferred favicon size. Passed on to | 23 int /* Preferred image size. Passed on to |
32 IconHostMsg_DidDownloadFavicon, unused otherwise */) | 24 ImageHostMsg_DidDownloadFavicon, unused otherwise */) |
33 | 25 |
34 // Messages sent from the renderer to the browser. | 26 // Messages sent from the renderer to the browser. |
35 | 27 |
36 // Notification that the urls for the favicon of a site has been determined. | 28 IPC_MESSAGE_ROUTED4(ImageHostMsg_DidDownloadImage, |
37 IPC_MESSAGE_ROUTED2(IconHostMsg_UpdateFaviconURL, | |
38 int32 /* page_id */, | |
39 std::vector<content::FaviconURL> /* urls of the favicon */) | |
40 | |
41 IPC_MESSAGE_ROUTED4(IconHostMsg_DidDownloadFavicon, | |
42 int /* Identifier of the request */, | 29 int /* Identifier of the request */, |
43 GURL /* URL of the image */, | 30 GURL /* URL of the image */, |
44 int /* Preferred icon size passed to | 31 int /* Preferred image size passed to |
45 IconMsg_DownloadFavicon */, | 32 ImageMsg_DownloadImage */, |
46 std::vector<SkBitmap> /* image_data */) | 33 std::vector<SkBitmap> /* image_data */) |
OLD | NEW |