Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 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 | 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 // IPC messages for HTML5 Blob. | 5 // IPC messages for HTML5 Blob. |
| 6 // Multiply-included message file, hence no include guard. | 6 // Multiply-included message file, hence no include guard. |
| 7 | 7 |
| 8 #include "content/common/common_param_traits.h" | 8 #include "content/common/common_param_traits.h" |
| 9 #include "content/common/webkit_param_traits.h" | 9 #include "content/common/webkit_param_traits.h" |
| 10 #include "ipc/ipc_message_macros.h" | 10 #include "ipc/ipc_message_macros.h" |
| 11 | 11 |
| 12 #define IPC_MESSAGE_START BlobMsgStart | 12 #define IPC_MESSAGE_START BlobMsgStart |
| 13 | 13 |
| 14 IPC_ENUM_TRAITS(webkit_blob::BlobData::Type) | |
| 15 | |
| 16 IPC_STRUCT_TRAITS_BEGIN(webkit_blob::BlobData::Item) | |
| 17 IPC_STRUCT_TRAITS_MEMBER(type) | |
| 18 IPC_STRUCT_TRAITS_MEMBER(data) | |
| 19 IPC_STRUCT_TRAITS_MEMBER(file_path) | |
| 20 IPC_STRUCT_TRAITS_MEMBER(blob_url) | |
| 21 IPC_STRUCT_TRAITS_MEMBER(offset) | |
| 22 IPC_STRUCT_TRAITS_MEMBER(length) | |
| 23 IPC_STRUCT_TRAITS_MEMBER(expected_modification_time) | |
| 24 IPC_STRUCT_TRAITS_END() | |
| 25 | |
| 14 // Blob messages sent from the renderer to the browser. | 26 // Blob messages sent from the renderer to the browser. |
| 15 | 27 |
| 16 // Registers a blob URL referring to the specified blob data. | 28 |
| 17 IPC_MESSAGE_CONTROL2(BlobHostMsg_RegisterBlobUrl, | 29 // Registers a blob as being built. |
| 30 IPC_MESSAGE_CONTROL1(BlobHostMsg_StartBuildingBlob, | |
| 31 GURL /* url */) | |
| 32 | |
| 33 // Appends data to a blob being built. | |
| 34 IPC_MESSAGE_CONTROL2(BlobHostMsg_AppendBlobDataItem, | |
| 18 GURL /* url */, | 35 GURL /* url */, |
| 19 scoped_refptr<webkit_blob::BlobData> /* blob_data */) | 36 webkit_blob::BlobData::Item) |
| 20 | 37 |
| 21 // Registers a blob URL referring to the blob data identified by the specified | 38 // Asks the browser to create a block of shared memory for the renderer to |
| 22 // source URL. | 39 // fill in and pass back to the browser. |
| 23 IPC_MESSAGE_CONTROL2(BlobHostMsg_RegisterBlobUrlFrom, | 40 IPC_SYNC_MESSAGE_CONTROL1_1(BlobHostMsg_SyncAllocateSharedMemory, |
|
jam
2011/10/11 01:56:51
no need to duplicate this. you can reuse the exist
jam
2011/10/11 02:02:18
just to be clear, we should reuse not just the mes
| |
| 41 size_t /* buffer size */, | |
| 42 base::SharedMemoryHandle) | |
| 43 | |
| 44 // Appends data to a blob being built. | |
| 45 IPC_SYNC_MESSAGE_CONTROL3_0(BlobHostMsg_SyncAppendSharedMemory, | |
| 46 GURL /* url */, | |
| 47 base::SharedMemoryHandle, | |
| 48 size_t /* buffer size */) | |
| 49 | |
| 50 // Finishes building a blob. | |
| 51 IPC_MESSAGE_CONTROL2(BlobHostMsg_FinishBuildingBlob, | |
| 52 GURL /* url */, | |
| 53 std::string /* content_type */) | |
| 54 | |
| 55 // Creates a new blob that's a clone of an existing src blob. | |
| 56 // The source blob must be fully built. | |
| 57 IPC_MESSAGE_CONTROL2(BlobHostMsg_CloneBlob, | |
| 24 GURL /* url */, | 58 GURL /* url */, |
| 25 GURL /* src_url */) | 59 GURL /* src_url */) |
| 26 | 60 |
| 27 // Unregister a blob URL. | 61 // Removes a blob. |
| 28 IPC_MESSAGE_CONTROL1(BlobHostMsg_UnregisterBlobUrl, | 62 IPC_MESSAGE_CONTROL1(BlobHostMsg_RemoveBlob, |
| 29 GURL /* url */) | 63 GURL /* url */) |
| OLD | NEW |