OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2015 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, hence no include guard. | |
6 | |
7 #include <vector> | |
8 | |
9 #include "base/memory/shared_memory.h" | |
10 #include "content/common/content_export.h" | |
11 #include "ipc/ipc_message_macros.h" | |
12 #include "ipc/ipc_message_utils.h" | |
13 #include "ipc/ipc_param_traits.h" | |
14 #include "ipc/ipc_platform_file.h" | |
15 #include "storage/common/blob_storage/blob_item_bytes_request.h" | |
16 #include "storage/common/blob_storage/blob_item_bytes_response.h" | |
17 #include "storage/common/blob_storage/blob_storage_constants.h" | |
18 #include "storage/common/data_element.h" | |
19 | |
20 #undef IPC_MESSAGE_EXPORT | |
21 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT | |
22 #define IPC_MESSAGE_START BlobMsgStart | |
michaeln
2015/08/18 03:04:41
BlobMsgStart is in use in webblob_messages.h. I th
dmurph
2015/09/15 01:12:12
Yes, I actually move all of the blob message over
| |
23 | |
24 IPC_ENUM_TRAITS_MAX_VALUE(storage::IPCBlobItemRequestStrategy, | |
25 storage::IPCBlobItemRequestStrategy::LAST) | |
26 IPC_ENUM_TRAITS_MAX_VALUE(storage::IPCBlobCreationCancelCode, | |
27 storage::IPCBlobCreationCancelCode::LAST) | |
28 | |
29 IPC_STRUCT_TRAITS_BEGIN(storage::BlobItemBytesRequest) | |
30 IPC_STRUCT_TRAITS_MEMBER(request_number) | |
31 IPC_STRUCT_TRAITS_MEMBER(transport_strategy) | |
32 IPC_STRUCT_TRAITS_MEMBER(renderer_item_index) | |
33 IPC_STRUCT_TRAITS_MEMBER(renderer_item_offset) | |
34 IPC_STRUCT_TRAITS_MEMBER(size) | |
35 IPC_STRUCT_TRAITS_MEMBER(handle_index) | |
36 IPC_STRUCT_TRAITS_MEMBER(handle_offset) | |
37 IPC_STRUCT_TRAITS_END() | |
38 | |
39 IPC_STRUCT_TRAITS_BEGIN(storage::BlobItemBytesResponse) | |
40 IPC_STRUCT_TRAITS_MEMBER(request_number) | |
41 IPC_STRUCT_TRAITS_MEMBER(inline_data) | |
42 IPC_STRUCT_TRAITS_END() | |
43 | |
44 // This message is to tell the browser that we will be building a blob. | |
45 IPC_MESSAGE_CONTROL1(BlobStorageMsg_RegisterBlobUUID, std::string /* uuid */); | |
46 | |
47 // The DataElements are used to: | |
48 // * describe & transport non-memory resources (blobs, files, etc) | |
49 // * describe the size of memory items | |
50 // * 'shortcut' transport the memory up to the IPC limit so the browser can use | |
51 // it if it's not currently full. | |
52 // See https://bit.ly/BlobStorageRefactor | |
53 IPC_MESSAGE_CONTROL3(BlobStorageMsg_StartBuildingBlob, | |
54 std::string /* uuid */, | |
55 std::string /* type */, | |
56 std::vector<storage::DataElement> /* item_descriptions */); | |
57 | |
58 IPC_MESSAGE_CONTROL4(BlobStorageMsg_RequestMemoryItem, | |
59 std::string, // uuid | |
60 std::vector<storage::BlobItemBytesRequest>, // requests | |
61 std::vector<base::SharedMemoryHandle>, // memory_handles | |
62 std::vector<IPC::PlatformFileForTransit>); // file_handles | |
63 | |
64 IPC_MESSAGE_CONTROL2(BlobStorageMsg_MemoryItemResponse, | |
65 std::string, // uuid | |
66 std::vector<storage::BlobItemBytesResponse>); // responses | |
67 | |
68 IPC_MESSAGE_CONTROL2(BlobStorageMsg_CancelBuildingBlob, | |
69 std::string, // uuid | |
70 storage::IPCBlobCreationCancelCode); // code | |
71 | |
72 IPC_MESSAGE_CONTROL1(BlobStorageMsg_DoneBuildingBlob, std::string); // uuid | |
OLD | NEW |