| 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 the file system. | 5 // IPC messages for the file system. |
| 6 // Multiply-included message file, hence no include guard. | 6 // Multiply-included message file, hence no include guard. |
| 7 | 7 |
| 8 #include "base/files/file_util_proxy.h" | 8 #include "base/files/file_util_proxy.h" |
| 9 #include "googleurl/src/gurl.h" | 9 #include "googleurl/src/gurl.h" |
| 10 #include "ipc/ipc_message_macros.h" | 10 #include "ipc/ipc_message_macros.h" |
| 11 #include "ipc/ipc_platform_file.h" | 11 #include "ipc/ipc_platform_file.h" |
| 12 #include "webkit/fileapi/file_system_types.h" | 12 #include "webkit/fileapi/file_system_types.h" |
| 13 #include "webkit/quota/quota_types.h" |
| 13 | 14 |
| 14 #define IPC_MESSAGE_START FileSystemMsgStart | 15 #define IPC_MESSAGE_START FileSystemMsgStart |
| 15 | 16 |
| 16 IPC_STRUCT_TRAITS_BEGIN(base::FileUtilProxy::Entry) | 17 IPC_STRUCT_TRAITS_BEGIN(base::FileUtilProxy::Entry) |
| 17 IPC_STRUCT_TRAITS_MEMBER(name) | 18 IPC_STRUCT_TRAITS_MEMBER(name) |
| 18 IPC_STRUCT_TRAITS_MEMBER(is_directory) | 19 IPC_STRUCT_TRAITS_MEMBER(is_directory) |
| 19 IPC_STRUCT_TRAITS_END() | 20 IPC_STRUCT_TRAITS_END() |
| 20 | 21 |
| 21 IPC_ENUM_TRAITS(fileapi::FileSystemType) | 22 IPC_ENUM_TRAITS(fileapi::FileSystemType) |
| 23 IPC_ENUM_TRAITS(quota::QuotaLimitType) |
| 22 | 24 |
| 23 // File system messages sent from the browser to the child process. | 25 // File system messages sent from the browser to the child process. |
| 24 | 26 |
| 25 // WebFrameClient::openFileSystem response messages. | 27 // WebFrameClient::openFileSystem response messages. |
| 26 IPC_MESSAGE_CONTROL3(FileSystemMsg_DidOpenFileSystem, | 28 IPC_MESSAGE_CONTROL3(FileSystemMsg_DidOpenFileSystem, |
| 27 int /* request_id */, | 29 int /* request_id */, |
| 28 std::string /* name */, | 30 std::string /* name */, |
| 29 GURL /* root_url */) | 31 GURL /* root_url */) |
| 30 | 32 |
| 31 // WebFileSystem response messages. | 33 // WebFileSystem response messages. |
| 32 IPC_MESSAGE_CONTROL1(FileSystemMsg_DidSucceed, | 34 IPC_MESSAGE_CONTROL1(FileSystemMsg_DidSucceed, |
| 33 int /* request_id */) | 35 int /* request_id */) |
| 34 IPC_MESSAGE_CONTROL3(FileSystemMsg_DidReadMetadata, | 36 IPC_MESSAGE_CONTROL3(FileSystemMsg_DidReadMetadata, |
| 35 int /* request_id */, | 37 int /* request_id */, |
| 36 base::PlatformFileInfo, | 38 base::PlatformFileInfo, |
| 37 base::FilePath /* true platform path, where possible */) | 39 base::FilePath /* true platform path, where possible */) |
| 38 IPC_MESSAGE_CONTROL3(FileSystemMsg_DidCreateSnapshotFile, | 40 IPC_MESSAGE_CONTROL3(FileSystemMsg_DidCreateSnapshotFile, |
| 39 int /* request_id */, | 41 int /* request_id */, |
| 40 base::PlatformFileInfo, | 42 base::PlatformFileInfo, |
| 41 base::FilePath /* true platform path */) | 43 base::FilePath /* true platform path */) |
| 42 IPC_MESSAGE_CONTROL3(FileSystemMsg_DidReadDirectory, | 44 IPC_MESSAGE_CONTROL3(FileSystemMsg_DidReadDirectory, |
| 43 int /* request_id */, | 45 int /* request_id */, |
| 44 std::vector<base::FileUtilProxy::Entry> /* entries */, | 46 std::vector<base::FileUtilProxy::Entry> /* entries */, |
| 45 bool /* has_more */) | 47 bool /* has_more */) |
| 46 IPC_MESSAGE_CONTROL3(FileSystemMsg_DidWrite, | 48 IPC_MESSAGE_CONTROL3(FileSystemMsg_DidWrite, |
| 47 int /* request_id */, | 49 int /* request_id */, |
| 48 int64 /* byte count */, | 50 int64 /* byte count */, |
| 49 bool /* complete */) | 51 bool /* complete */) |
| 50 IPC_MESSAGE_CONTROL2(FileSystemMsg_DidOpenFile, | 52 IPC_MESSAGE_CONTROL3(FileSystemMsg_DidOpenFile, |
| 51 int /* request_id */, | 53 int /* request_id */, |
| 52 IPC::PlatformFileForTransit) | 54 IPC::PlatformFileForTransit, |
| 55 quota::QuotaLimitType /* quota_policy */) |
| 53 IPC_MESSAGE_CONTROL2(FileSystemMsg_DidFail, | 56 IPC_MESSAGE_CONTROL2(FileSystemMsg_DidFail, |
| 54 int /* request_id */, | 57 int /* request_id */, |
| 55 base::PlatformFileError /* error_code */) | 58 base::PlatformFileError /* error_code */) |
| 56 | 59 |
| 57 // File system messages sent from the child process to the browser. | 60 // File system messages sent from the child process to the browser. |
| 58 | 61 |
| 59 // WebFrameClient::openFileSystem() message. | 62 // WebFrameClient::openFileSystem() message. |
| 60 IPC_MESSAGE_CONTROL5(FileSystemHostMsg_Open, | 63 IPC_MESSAGE_CONTROL5(FileSystemHostMsg_Open, |
| 61 int /* request_id */, | 64 int /* request_id */, |
| 62 GURL /* origin_url */, | 65 GURL /* origin_url */, |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 169 GURL /* file path */, | 172 GURL /* file path */, |
| 170 base::FilePath /* platform_path */) | 173 base::FilePath /* platform_path */) |
| 171 | 174 |
| 172 // Pre- and post-update notifications for ppapi implementation. | 175 // Pre- and post-update notifications for ppapi implementation. |
| 173 IPC_MESSAGE_CONTROL1(FileSystemHostMsg_WillUpdate, | 176 IPC_MESSAGE_CONTROL1(FileSystemHostMsg_WillUpdate, |
| 174 GURL /* file_path */) | 177 GURL /* file_path */) |
| 175 | 178 |
| 176 IPC_MESSAGE_CONTROL2(FileSystemHostMsg_DidUpdate, | 179 IPC_MESSAGE_CONTROL2(FileSystemHostMsg_DidUpdate, |
| 177 GURL /* file_path */, | 180 GURL /* file_path */, |
| 178 int64 /* delta */) | 181 int64 /* delta */) |
| OLD | NEW |