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

Unified 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 side-by-side diff with in-line comments
Download patch
Index: content/common/blob_storage/blob_storage_messages.h
diff --git a/content/common/blob_storage/blob_storage_messages.h b/content/common/blob_storage/blob_storage_messages.h
new file mode 100644
index 0000000000000000000000000000000000000000..6c4746bf2f3f0593500f664230370d349844cd40
--- /dev/null
+++ b/content/common/blob_storage/blob_storage_messages.h
@@ -0,0 +1,72 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// 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
+
+#include <vector>
+
+#include "base/memory/shared_memory.h"
+#include "content/common/content_export.h"
+#include "ipc/ipc_message_macros.h"
+#include "ipc/ipc_message_utils.h"
+#include "ipc/ipc_param_traits.h"
+#include "ipc/ipc_platform_file.h"
+#include "storage/common/blob_storage/blob_item_bytes_request.h"
+#include "storage/common/blob_storage/blob_item_bytes_response.h"
+#include "storage/common/blob_storage/blob_storage_constants.h"
+#include "storage/common/data_element.h"
+
+#undef IPC_MESSAGE_EXPORT
+#define IPC_MESSAGE_EXPORT CONTENT_EXPORT
+#define IPC_MESSAGE_START AsyncBlobMsgStart
+
+IPC_ENUM_TRAITS_MAX_VALUE(storage::IPCBlobItemRequestStrategy,
+ storage::IPCBlobItemRequestStrategy::LAST)
+IPC_ENUM_TRAITS_MAX_VALUE(storage::IPCBlobCreationCancelCode,
+ storage::IPCBlobCreationCancelCode::LAST)
+
+IPC_STRUCT_TRAITS_BEGIN(storage::BlobItemBytesRequest)
+ IPC_STRUCT_TRAITS_MEMBER(request_number)
+ IPC_STRUCT_TRAITS_MEMBER(transport_strategy)
+ IPC_STRUCT_TRAITS_MEMBER(renderer_item_index)
+ IPC_STRUCT_TRAITS_MEMBER(renderer_item_offset)
+ IPC_STRUCT_TRAITS_MEMBER(size)
+ IPC_STRUCT_TRAITS_MEMBER(handle_index)
+ IPC_STRUCT_TRAITS_MEMBER(handle_offset)
+IPC_STRUCT_TRAITS_END()
+
+IPC_STRUCT_TRAITS_BEGIN(storage::BlobItemBytesResponse)
+ IPC_STRUCT_TRAITS_MEMBER(request_number)
+ IPC_STRUCT_TRAITS_MEMBER(inline_data)
+IPC_STRUCT_TRAITS_END()
+
+// This message is to tell the browser that we will be building a blob.
+IPC_MESSAGE_CONTROL1(BlobStorageMsg_RegisterBlobUUID, std::string /* uuid */);
+
+// The DataElements are used to:
+// * describe & transport non-memory resources (blobs, files, etc)
+// * describe the size of memory items
+// * 'shortcut' transport the memory up to the IPC limit so the browser can use
+// it if it's not currently full.
+// See https://bit.ly/BlobStorageRefactor
+IPC_MESSAGE_CONTROL3(BlobStorageMsg_StartBuildingBlob,
+ std::string /* uuid */,
+ std::string /* type */,
+ std::vector<storage::DataElement> /* item_descriptions */);
+
+IPC_MESSAGE_CONTROL4(BlobStorageMsg_RequestMemoryItem,
+ std::string, // uuid
+ std::vector<storage::BlobItemBytesRequest>, // requests
+ std::vector<base::SharedMemoryHandle>, // memory_handles
+ std::vector<IPC::PlatformFileForTransit>); // file_handles
+
+IPC_MESSAGE_CONTROL2(BlobStorageMsg_MemoryItemResponse,
+ std::string, // uuid
+ std::vector<storage::BlobItemBytesResponse>); // responses
+
+IPC_MESSAGE_CONTROL2(BlobStorageMsg_CancelBuildingBlob,
+ std::string, // uuid
+ storage::IPCBlobCreationCancelCode); // code
+
+IPC_MESSAGE_CONTROL1(BlobStorageMsg_DoneBuildingBlob, std::string); // uuid

Powered by Google App Engine
This is Rietveld 408576698