OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2011 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 // IPC messages for the file system. |
| 6 // Multiply-included message file, hence no include guard. |
| 7 |
| 8 #include "base/file_util_proxy.h" |
| 9 #include "ipc/ipc_message_macros.h" |
| 10 #include "webkit/fileapi/file_system_types.h" |
| 11 |
| 12 #define IPC_MESSAGE_START FileSystemMsgStart |
| 13 |
| 14 IPC_STRUCT_TRAITS_BEGIN(base::FileUtilProxy::Entry) |
| 15 IPC_STRUCT_TRAITS_MEMBER(name) |
| 16 IPC_STRUCT_TRAITS_MEMBER(is_directory) |
| 17 IPC_STRUCT_TRAITS_END() |
| 18 |
| 19 IPC_ENUM_TRAITS(fileapi::FileSystemType) |
| 20 |
| 21 // File system messages sent from the browser to the child process. |
| 22 |
| 23 // WebFrameClient::openFileSystem response messages. |
| 24 IPC_MESSAGE_CONTROL4(FileSystemMsg_OpenComplete, |
| 25 int /* request_id */, |
| 26 bool /* accepted */, |
| 27 std::string /* name */, |
| 28 FilePath /* root_path */) |
| 29 |
| 30 // WebFileSystem response messages. |
| 31 IPC_MESSAGE_CONTROL1(FileSystemMsg_DidSucceed, |
| 32 int /* request_id */) |
| 33 IPC_MESSAGE_CONTROL2(FileSystemMsg_DidReadMetadata, |
| 34 int /* request_id */, |
| 35 base::PlatformFileInfo) |
| 36 IPC_MESSAGE_CONTROL3(FileSystemMsg_DidReadDirectory, |
| 37 int /* request_id */, |
| 38 std::vector<base::FileUtilProxy::Entry> /* entries */, |
| 39 bool /* has_more */) |
| 40 IPC_MESSAGE_CONTROL3(FileSystemMsg_DidWrite, |
| 41 int /* request_id */, |
| 42 int64 /* byte count */, |
| 43 bool /* complete */) |
| 44 IPC_MESSAGE_CONTROL2(FileSystemMsg_DidFail, |
| 45 int /* request_id */, |
| 46 base::PlatformFileError /* error_code */) |
| 47 |
| 48 // File system messages sent from the child process to the browser. |
| 49 |
| 50 // WebFrameClient::openFileSystem() message. |
| 51 IPC_MESSAGE_CONTROL5(FileSystemHostMsg_Open, |
| 52 int /* request_id */, |
| 53 GURL /* origin_url */, |
| 54 fileapi::FileSystemType /* type */, |
| 55 int64 /* requested_size */, |
| 56 bool /* create */) |
| 57 |
| 58 // WebFileSystem::move() message. |
| 59 IPC_MESSAGE_CONTROL3(FileSystemHostMsg_Move, |
| 60 int /* request_id */, |
| 61 FilePath /* src path */, |
| 62 FilePath /* dest path */) |
| 63 |
| 64 // WebFileSystem::copy() message. |
| 65 IPC_MESSAGE_CONTROL3(FileSystemHostMsg_Copy, |
| 66 int /* request_id */, |
| 67 FilePath /* src path */, |
| 68 FilePath /* dest path */) |
| 69 |
| 70 // WebFileSystem::remove() message. |
| 71 IPC_MESSAGE_CONTROL3(FileSystemMsg_Remove, |
| 72 int /* request_id */, |
| 73 FilePath /* path */, |
| 74 bool /* recursive */) |
| 75 |
| 76 // WebFileSystem::readMetadata() message. |
| 77 IPC_MESSAGE_CONTROL2(FileSystemHostMsg_ReadMetadata, |
| 78 int /* request_id */, |
| 79 FilePath /* path */) |
| 80 |
| 81 // WebFileSystem::create() message. |
| 82 IPC_MESSAGE_CONTROL5(FileSystemHostMsg_Create, |
| 83 int /* request_id */, |
| 84 FilePath /* path */, |
| 85 bool /* exclusive */, |
| 86 bool /* is_directory */, |
| 87 bool /* recursive */) |
| 88 |
| 89 // WebFileSystem::exists() messages. |
| 90 IPC_MESSAGE_CONTROL3(FileSystemHostMsg_Exists, |
| 91 int /* request_id */, |
| 92 FilePath /* path */, |
| 93 bool /* is_directory */) |
| 94 |
| 95 // WebFileSystem::readDirectory() message. |
| 96 IPC_MESSAGE_CONTROL2(FileSystemHostMsg_ReadDirectory, |
| 97 int /* request_id */, |
| 98 FilePath /* path */) |
| 99 |
| 100 // WebFileWriter::write() message. |
| 101 IPC_MESSAGE_CONTROL4(FileSystemHostMsg_Write, |
| 102 int /* request id */, |
| 103 FilePath /* file path */, |
| 104 GURL /* blob URL */, |
| 105 int64 /* position */) |
| 106 |
| 107 // WebFileWriter::truncate() message. |
| 108 IPC_MESSAGE_CONTROL3(FileSystemHostMsg_Truncate, |
| 109 int /* request id */, |
| 110 FilePath /* file path */, |
| 111 int64 /* length */) |
| 112 |
| 113 // Pepper's Touch() message. |
| 114 IPC_MESSAGE_CONTROL4(FileSystemHostMsg_TouchFile, |
| 115 int /* request_id */, |
| 116 FilePath /* path */, |
| 117 base::Time /* last_access_time */, |
| 118 base::Time /* last_modified_time */) |
| 119 |
| 120 // WebFileWriter::cancel() message. |
| 121 IPC_MESSAGE_CONTROL2(FileSystemHostMsg_CancelWrite, |
| 122 int /* request id */, |
| 123 int /* id of request to cancel */) |
OLD | NEW |