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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 IPC_STRUCT_TRAITS_MEMBER(time_file_modified) | 47 IPC_STRUCT_TRAITS_MEMBER(time_file_modified) |
48 IPC_STRUCT_TRAITS_END() | 48 IPC_STRUCT_TRAITS_END() |
49 | 49 |
50 // This message is to tell the browser that we will be building a blob. The | 50 // This message is to tell the browser that we will be building a blob. The |
51 // DataElements are used to: | 51 // DataElements are used to: |
52 // * describe & transport non-memory resources (blobs, files, etc) | 52 // * describe & transport non-memory resources (blobs, files, etc) |
53 // * describe the size of memory items | 53 // * describe the size of memory items |
54 // * '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 |
55 // it if it's not currently full. | 55 // it if it's not currently full. |
56 // See https://bit.ly/BlobStorageRefactor | 56 // See https://bit.ly/BlobStorageRefactor |
57 IPC_MESSAGE_CONTROL4(BlobStorageMsg_RegisterBlob, | 57 // |
58 std::string /* uuid */, | 58 // NOTE: This message is synchronous to ensure that the browser is aware of the |
59 std::string /* content_type */, | 59 // UUID before the UUID is passed to another process. This protects against a |
60 std::string /* content_disposition */, | 60 // race condition in which the browser could be asked about a UUID that doesn't |
61 std::vector<storage::DataElement> /* item_descriptions */) | 61 // yet exist from its perspective. See also https://goo.gl/bfdE64. |
| 62 // |
| 63 IPC_SYNC_MESSAGE_CONTROL4_0( |
| 64 BlobStorageMsg_RegisterBlob, |
| 65 std::string /* uuid */, |
| 66 std::string /* content_type */, |
| 67 std::string /* content_disposition */, |
| 68 std::vector<storage::DataElement> /* item_descriptions */) |
62 | 69 |
63 IPC_MESSAGE_CONTROL4( | 70 IPC_MESSAGE_CONTROL4( |
64 BlobStorageMsg_RequestMemoryItem, | 71 BlobStorageMsg_RequestMemoryItem, |
65 std::string /* uuid */, | 72 std::string /* uuid */, |
66 std::vector<storage::BlobItemBytesRequest> /* requests */, | 73 std::vector<storage::BlobItemBytesRequest> /* requests */, |
67 std::vector<base::SharedMemoryHandle> /* memory_handles */, | 74 std::vector<base::SharedMemoryHandle> /* memory_handles */, |
68 std::vector<IPC::PlatformFileForTransit> /* file_handles */) | 75 std::vector<IPC::PlatformFileForTransit> /* file_handles */) |
69 | 76 |
70 IPC_MESSAGE_CONTROL2( | 77 IPC_MESSAGE_CONTROL2( |
71 BlobStorageMsg_MemoryItemResponse, | 78 BlobStorageMsg_MemoryItemResponse, |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
117 GURL /* url */) | 124 GURL /* url */) |
118 | 125 |
119 // Creates a new stream that's a clone of an existing src stream. | 126 // Creates a new stream that's a clone of an existing src stream. |
120 IPC_MESSAGE_CONTROL2(StreamHostMsg_Clone, | 127 IPC_MESSAGE_CONTROL2(StreamHostMsg_Clone, |
121 GURL /* url */, | 128 GURL /* url */, |
122 GURL /* src_url */) | 129 GURL /* src_url */) |
123 | 130 |
124 // Removes a stream. | 131 // Removes a stream. |
125 IPC_MESSAGE_CONTROL1(StreamHostMsg_Remove, | 132 IPC_MESSAGE_CONTROL1(StreamHostMsg_Remove, |
126 GURL /* url */) | 133 GURL /* url */) |
OLD | NEW |