| 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 "ipc/ipc_message.h" | 8 #include "ipc/ipc_message.h" |
| 9 #include "ipc/ipc_message_macros.h" | 9 #include "ipc/ipc_message_macros.h" |
| 10 #include "ipc/ipc_param_traits.h" | 10 #include "ipc/ipc_param_traits.h" |
| 11 #include "third_party/WebKit/public/platform/WebURLRequest.h" |
| 11 #include "third_party/skia/include/core/SkBitmap.h" | 12 #include "third_party/skia/include/core/SkBitmap.h" |
| 12 #include "ui/gfx/geometry/size.h" | 13 #include "ui/gfx/geometry/size.h" |
| 13 | 14 |
| 14 #define IPC_MESSAGE_START ImageMsgStart | 15 #define IPC_MESSAGE_START ImageMsgStart |
| 15 | 16 |
| 16 // Messages sent from the browser to the renderer. | 17 // Messages sent from the browser to the renderer. |
| 18 IPC_ENUM_TRAITS(blink::WebURLRequest::CachePolicy); |
| 17 | 19 |
| 18 // Requests the renderer to download the specified image, decode it, | 20 // Requests the renderer to download the specified image, decode it, |
| 19 // and send the image data back via ImageHostMsg_DidDownloadImage. | 21 // and send the image data back via ImageHostMsg_DidDownloadImage. |
| 20 IPC_MESSAGE_ROUTED4(ImageMsg_DownloadImage, | 22 IPC_MESSAGE_ROUTED5(ImageMsg_DownloadImage, |
| 21 int /* Identifier for the request */, | 23 int /* Identifier for the request */, |
| 22 GURL /* URL of the image */, | 24 GURL /* URL of the image */, |
| 23 bool /* is favicon (turn off cookies) */, | 25 bool /* is favicon (turn off cookies) */, |
| 24 uint32_t /* Maximal bitmap size in pixel. The results are | 26 uint32_t /* Maximal bitmap size in pixel. The results are |
| 25 filtered according the max size. If there are no | 27 filtered according the max size. If there are no |
| 26 bitmaps at the passed in GURL <= max size, the | 28 bitmaps at the passed in GURL <= max size, the |
| 27 smallest bitmap is resized to the max size and | 29 smallest bitmap is resized to the max size and |
| 28 is the only result. A max size of zero means | 30 is the only result. A max size of zero means |
| 29 that the max size is unlimited. */) | 31 that the max size is unlimited. */, |
| 32 blink::WebURLRequest::CachePolicy /* cache policy */) |
| 30 | 33 |
| 31 // Messages sent from the renderer to the browser. | 34 // Messages sent from the renderer to the browser. |
| 32 | 35 |
| 33 IPC_MESSAGE_ROUTED5(ImageHostMsg_DidDownloadImage, | 36 IPC_MESSAGE_ROUTED5(ImageHostMsg_DidDownloadImage, |
| 34 int /* Identifier of the request */, | 37 int /* Identifier of the request */, |
| 35 int /* HTTP response status */, | 38 int /* HTTP response status */, |
| 36 GURL /* URL of the image */, | 39 GURL /* URL of the image */, |
| 37 std::vector<SkBitmap> /* bitmap data */, | 40 std::vector<SkBitmap> /* bitmap data */, |
| 38 /* The sizes in pixel of the bitmaps before they were | 41 /* The sizes in pixel of the bitmaps before they were |
| 39 resized due to the maximal bitmap size passed to | 42 resized due to the maximal bitmap size passed to |
| 40 ImageMsg_DownloadImage. Each entry in the bitmaps vector | 43 ImageMsg_DownloadImage. Each entry in the bitmaps vector |
| 41 corresponds to an entry in the sizes vector. If a bitmap | 44 corresponds to an entry in the sizes vector. If a bitmap |
| 42 was resized, there should be a single returned bitmap. */ | 45 was resized, there should be a single returned bitmap. */ |
| 43 std::vector<gfx::Size>) | 46 std::vector<gfx::Size>) |
| OLD | NEW |