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 // IPC messages for HTML5 Blob and Stream. | 5 // IPC messages for HTML5 Blob and Stream. |
6 // Multiply-included message file, hence no include guard. | 6 // Multiply-included message file, hence no include guard. |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 | 9 |
10 #include <set> | 10 #include <set> |
(...skipping 11 matching lines...) Expand all Loading... |
22 #include "url/ipc/url_param_traits.h" | 22 #include "url/ipc/url_param_traits.h" |
23 | 23 |
24 #undef IPC_MESSAGE_EXPORT | 24 #undef IPC_MESSAGE_EXPORT |
25 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT | 25 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT |
26 #define IPC_MESSAGE_START BlobMsgStart | 26 #define IPC_MESSAGE_START BlobMsgStart |
27 | 27 |
28 // Trait definitions for async blob transport messages. | 28 // Trait definitions for async blob transport messages. |
29 | 29 |
30 IPC_ENUM_TRAITS_MAX_VALUE(storage::IPCBlobItemRequestStrategy, | 30 IPC_ENUM_TRAITS_MAX_VALUE(storage::IPCBlobItemRequestStrategy, |
31 storage::IPCBlobItemRequestStrategy::LAST) | 31 storage::IPCBlobItemRequestStrategy::LAST) |
32 IPC_ENUM_TRAITS_MAX_VALUE(storage::IPCBlobCreationCancelCode, | 32 IPC_ENUM_TRAITS_MAX_VALUE(storage::BlobStatus, storage::BlobStatus::LAST) |
33 storage::IPCBlobCreationCancelCode::LAST) | |
34 | 33 |
35 IPC_STRUCT_TRAITS_BEGIN(storage::BlobItemBytesRequest) | 34 IPC_STRUCT_TRAITS_BEGIN(storage::BlobItemBytesRequest) |
36 IPC_STRUCT_TRAITS_MEMBER(request_number) | 35 IPC_STRUCT_TRAITS_MEMBER(request_number) |
37 IPC_STRUCT_TRAITS_MEMBER(transport_strategy) | 36 IPC_STRUCT_TRAITS_MEMBER(transport_strategy) |
38 IPC_STRUCT_TRAITS_MEMBER(renderer_item_index) | 37 IPC_STRUCT_TRAITS_MEMBER(renderer_item_index) |
39 IPC_STRUCT_TRAITS_MEMBER(renderer_item_offset) | 38 IPC_STRUCT_TRAITS_MEMBER(renderer_item_offset) |
40 IPC_STRUCT_TRAITS_MEMBER(size) | 39 IPC_STRUCT_TRAITS_MEMBER(size) |
41 IPC_STRUCT_TRAITS_MEMBER(handle_index) | 40 IPC_STRUCT_TRAITS_MEMBER(handle_index) |
42 IPC_STRUCT_TRAITS_MEMBER(handle_offset) | 41 IPC_STRUCT_TRAITS_MEMBER(handle_offset) |
43 IPC_STRUCT_TRAITS_END() | 42 IPC_STRUCT_TRAITS_END() |
44 | 43 |
45 IPC_STRUCT_TRAITS_BEGIN(storage::BlobItemBytesResponse) | 44 IPC_STRUCT_TRAITS_BEGIN(storage::BlobItemBytesResponse) |
46 IPC_STRUCT_TRAITS_MEMBER(request_number) | 45 IPC_STRUCT_TRAITS_MEMBER(request_number) |
47 IPC_STRUCT_TRAITS_MEMBER(inline_data) | 46 IPC_STRUCT_TRAITS_MEMBER(inline_data) |
48 IPC_STRUCT_TRAITS_MEMBER(time_file_modified) | 47 IPC_STRUCT_TRAITS_MEMBER(time_file_modified) |
49 IPC_STRUCT_TRAITS_END() | 48 IPC_STRUCT_TRAITS_END() |
50 | 49 |
51 // This message is to tell the browser that we will be building a blob. | 50 // This message is to tell the browser that we will be building a blob. The |
52 IPC_MESSAGE_CONTROL4(BlobStorageMsg_RegisterBlobUUID, | 51 // DataElements are used to: |
53 std::string /* uuid */, | |
54 std::string /* content_type */, | |
55 std::string /* content_disposition */, | |
56 std::set<std::string> /* referenced_blob_uuids */) | |
57 | |
58 // The DataElements are used to: | |
59 // * describe & transport non-memory resources (blobs, files, etc) | 52 // * describe & transport non-memory resources (blobs, files, etc) |
60 // * describe the size of memory items | 53 // * describe the size of memory items |
61 // * 'shortcut' transport the memory up to the IPC limit so the browser can use | 54 // * 'shortcut' transport the memory up to the IPC limit so the browser can use |
62 // it if it's not currently full. | 55 // it if it's not currently full. |
63 // See https://bit.ly/BlobStorageRefactor | 56 // See https://bit.ly/BlobStorageRefactor |
64 IPC_MESSAGE_CONTROL2(BlobStorageMsg_StartBuildingBlob, | 57 IPC_MESSAGE_CONTROL4(BlobStorageMsg_RegisterBlob, |
65 std::string /* uuid */, | 58 std::string /* uuid */, |
| 59 std::string /* content_type */, |
| 60 std::string /* content_disposition */, |
66 std::vector<storage::DataElement> /* item_descriptions */) | 61 std::vector<storage::DataElement> /* item_descriptions */) |
67 | 62 |
68 IPC_MESSAGE_CONTROL4( | 63 IPC_MESSAGE_CONTROL4( |
69 BlobStorageMsg_RequestMemoryItem, | 64 BlobStorageMsg_RequestMemoryItem, |
70 std::string /* uuid */, | 65 std::string /* uuid */, |
71 std::vector<storage::BlobItemBytesRequest> /* requests */, | 66 std::vector<storage::BlobItemBytesRequest> /* requests */, |
72 std::vector<base::SharedMemoryHandle> /* memory_handles */, | 67 std::vector<base::SharedMemoryHandle> /* memory_handles */, |
73 std::vector<IPC::PlatformFileForTransit> /* file_handles */) | 68 std::vector<IPC::PlatformFileForTransit> /* file_handles */) |
74 | 69 |
75 IPC_MESSAGE_CONTROL2( | 70 IPC_MESSAGE_CONTROL2( |
76 BlobStorageMsg_MemoryItemResponse, | 71 BlobStorageMsg_MemoryItemResponse, |
77 std::string /* uuid */, | 72 std::string /* uuid */, |
78 std::vector<storage::BlobItemBytesResponse> /* responses */) | 73 std::vector<storage::BlobItemBytesResponse> /* responses */) |
79 | 74 |
80 IPC_MESSAGE_CONTROL2(BlobStorageMsg_CancelBuildingBlob, | 75 IPC_MESSAGE_CONTROL2(BlobStorageMsg_SendBlobStatus, |
81 std::string /* uuid */, | 76 std::string /* uuid */, |
82 storage::IPCBlobCreationCancelCode /* code */) | 77 storage::BlobStatus /* code */) |
83 | |
84 IPC_MESSAGE_CONTROL1(BlobStorageMsg_DoneBuildingBlob, std::string /* uuid */) | |
85 | 78 |
86 IPC_MESSAGE_CONTROL1(BlobHostMsg_IncrementRefCount, | 79 IPC_MESSAGE_CONTROL1(BlobHostMsg_IncrementRefCount, |
87 std::string /* uuid */) | 80 std::string /* uuid */) |
88 IPC_MESSAGE_CONTROL1(BlobHostMsg_DecrementRefCount, | 81 IPC_MESSAGE_CONTROL1(BlobHostMsg_DecrementRefCount, |
89 std::string /* uuid */) | 82 std::string /* uuid */) |
90 IPC_MESSAGE_CONTROL2(BlobHostMsg_RegisterPublicURL, | 83 IPC_MESSAGE_CONTROL2(BlobHostMsg_RegisterPublicURL, |
91 GURL, | 84 GURL, |
92 std::string /* uuid */) | 85 std::string /* uuid */) |
93 IPC_MESSAGE_CONTROL1(BlobHostMsg_RevokePublicURL, | 86 IPC_MESSAGE_CONTROL1(BlobHostMsg_RevokePublicURL, |
94 GURL) | 87 GURL) |
(...skipping 29 matching lines...) Expand all Loading... |
124 GURL /* url */) | 117 GURL /* url */) |
125 | 118 |
126 // Creates a new stream that's a clone of an existing src stream. | 119 // Creates a new stream that's a clone of an existing src stream. |
127 IPC_MESSAGE_CONTROL2(StreamHostMsg_Clone, | 120 IPC_MESSAGE_CONTROL2(StreamHostMsg_Clone, |
128 GURL /* url */, | 121 GURL /* url */, |
129 GURL /* src_url */) | 122 GURL /* src_url */) |
130 | 123 |
131 // Removes a stream. | 124 // Removes a stream. |
132 IPC_MESSAGE_CONTROL1(StreamHostMsg_Remove, | 125 IPC_MESSAGE_CONTROL1(StreamHostMsg_Remove, |
133 GURL /* url */) | 126 GURL /* url */) |
OLD | NEW |