Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(66)

Side by Side Diff: content/common/blob_storage/blob_storage_messages.h

Issue 1288373002: [BlobAsync] Patch 2: Common Constants (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@async1
Patch Set: linkage fix Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(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.
kinuko 2015/10/16 14:24:13 I know the intention was to split CL for smoother
dmurph 2015/10/16 21:37:30 In that case, I'll just put the IPCs in the old fi
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 AsyncBlobMsgStart
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698