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 "ipc/ipc_message_macros.h" | 8 #include "ipc/ipc_message_macros.h" |
9 #include "ipc/ipc_platform_file.h" | 9 #include "ipc/ipc_platform_file.h" |
10 #include "url/gurl.h" | 10 #include "url/gurl.h" |
11 #include "webkit/common/fileapi/directory_entry.h" | 11 #include "storage/common/fileapi/directory_entry.h" |
12 #include "webkit/common/fileapi/file_system_info.h" | 12 #include "storage/common/fileapi/file_system_info.h" |
13 #include "webkit/common/fileapi/file_system_types.h" | 13 #include "storage/common/fileapi/file_system_types.h" |
14 #include "webkit/common/quota/quota_types.h" | 14 #include "storage/common/quota/quota_types.h" |
15 | 15 |
16 #undef IPC_MESSAGE_EXPORT | 16 #undef IPC_MESSAGE_EXPORT |
17 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT | 17 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT |
18 #define IPC_MESSAGE_START FileSystemMsgStart | 18 #define IPC_MESSAGE_START FileSystemMsgStart |
19 | 19 |
20 IPC_STRUCT_TRAITS_BEGIN(fileapi::DirectoryEntry) | 20 IPC_STRUCT_TRAITS_BEGIN(storage::DirectoryEntry) |
21 IPC_STRUCT_TRAITS_MEMBER(name) | 21 IPC_STRUCT_TRAITS_MEMBER(name) |
22 IPC_STRUCT_TRAITS_MEMBER(is_directory) | 22 IPC_STRUCT_TRAITS_MEMBER(is_directory) |
23 IPC_STRUCT_TRAITS_END() | 23 IPC_STRUCT_TRAITS_END() |
24 | 24 |
25 IPC_STRUCT_TRAITS_BEGIN(fileapi::FileSystemInfo) | 25 IPC_STRUCT_TRAITS_BEGIN(storage::FileSystemInfo) |
26 IPC_STRUCT_TRAITS_MEMBER(name) | 26 IPC_STRUCT_TRAITS_MEMBER(name) |
27 IPC_STRUCT_TRAITS_MEMBER(root_url) | 27 IPC_STRUCT_TRAITS_MEMBER(root_url) |
28 IPC_STRUCT_TRAITS_MEMBER(mount_type) | 28 IPC_STRUCT_TRAITS_MEMBER(mount_type) |
29 IPC_STRUCT_TRAITS_END() | 29 IPC_STRUCT_TRAITS_END() |
30 | 30 |
31 IPC_ENUM_TRAITS(fileapi::FileSystemType) | 31 IPC_ENUM_TRAITS(storage::FileSystemType) |
32 IPC_ENUM_TRAITS(quota::QuotaLimitType) | 32 IPC_ENUM_TRAITS(quota::QuotaLimitType) |
33 | 33 |
34 // File system messages sent from the browser to the child process. | 34 // File system messages sent from the browser to the child process. |
35 | 35 |
36 // WebFrameClient::openFileSystem response messages. | 36 // WebFrameClient::openFileSystem response messages. |
37 IPC_MESSAGE_CONTROL3(FileSystemMsg_DidOpenFileSystem, | 37 IPC_MESSAGE_CONTROL3(FileSystemMsg_DidOpenFileSystem, |
38 int /* request_id */, | 38 int /* request_id */, |
39 std::string /* name */, | 39 std::string /* name */, |
40 GURL /* root_url */) | 40 GURL /* root_url */) |
41 | 41 |
42 // WebFileSystem response messages. | 42 // WebFileSystem response messages. |
43 IPC_MESSAGE_CONTROL4(FileSystemMsg_DidResolveURL, | 43 IPC_MESSAGE_CONTROL4(FileSystemMsg_DidResolveURL, |
44 int /* request_id */, | 44 int /* request_id */, |
45 fileapi::FileSystemInfo /* filesystem_info */, | 45 storage::FileSystemInfo /* filesystem_info */, |
46 base::FilePath /* file_path */, | 46 base::FilePath /* file_path */, |
47 bool /* is_directory */) | 47 bool /* is_directory */) |
48 IPC_MESSAGE_CONTROL1(FileSystemMsg_DidSucceed, | 48 IPC_MESSAGE_CONTROL1(FileSystemMsg_DidSucceed, |
49 int /* request_id */) | 49 int /* request_id */) |
50 IPC_MESSAGE_CONTROL2(FileSystemMsg_DidReadMetadata, | 50 IPC_MESSAGE_CONTROL2(FileSystemMsg_DidReadMetadata, |
51 int /* request_id */, | 51 int /* request_id */, |
52 base::File::Info) | 52 base::File::Info) |
53 IPC_MESSAGE_CONTROL3(FileSystemMsg_DidCreateSnapshotFile, | 53 IPC_MESSAGE_CONTROL3(FileSystemMsg_DidCreateSnapshotFile, |
54 int /* request_id */, | 54 int /* request_id */, |
55 base::File::Info, | 55 base::File::Info, |
56 base::FilePath /* true platform path */) | 56 base::FilePath /* true platform path */) |
57 IPC_MESSAGE_CONTROL3(FileSystemMsg_DidReadDirectory, | 57 IPC_MESSAGE_CONTROL3(FileSystemMsg_DidReadDirectory, |
58 int /* request_id */, | 58 int /* request_id */, |
59 std::vector<fileapi::DirectoryEntry> /* entries */, | 59 std::vector<storage::DirectoryEntry> /* entries */, |
60 bool /* has_more */) | 60 bool /* has_more */) |
61 IPC_MESSAGE_CONTROL3(FileSystemMsg_DidWrite, | 61 IPC_MESSAGE_CONTROL3(FileSystemMsg_DidWrite, |
62 int /* request_id */, | 62 int /* request_id */, |
63 int64 /* byte count */, | 63 int64 /* byte count */, |
64 bool /* complete */) | 64 bool /* complete */) |
65 IPC_MESSAGE_CONTROL2(FileSystemMsg_DidFail, | 65 IPC_MESSAGE_CONTROL2(FileSystemMsg_DidFail, |
66 int /* request_id */, | 66 int /* request_id */, |
67 base::File::Error /* error_code */) | 67 base::File::Error /* error_code */) |
68 | 68 |
69 // File system messages sent from the child process to the browser. | 69 // File system messages sent from the child process to the browser. |
70 | 70 |
71 // WebFrameClient::openFileSystem() message. | 71 // WebFrameClient::openFileSystem() message. |
72 IPC_MESSAGE_CONTROL3(FileSystemHostMsg_OpenFileSystem, | 72 IPC_MESSAGE_CONTROL3(FileSystemHostMsg_OpenFileSystem, |
73 int /* request_id */, | 73 int /* request_id */, |
74 GURL /* origin_url */, | 74 GURL /* origin_url */, |
75 fileapi::FileSystemType /* type */) | 75 storage::FileSystemType /* type */) |
76 | 76 |
77 // WevFrameClient::resolveURL() message. | 77 // WevFrameClient::resolveURL() message. |
78 IPC_MESSAGE_CONTROL2(FileSystemHostMsg_ResolveURL, | 78 IPC_MESSAGE_CONTROL2(FileSystemHostMsg_ResolveURL, |
79 int /* request_id */, | 79 int /* request_id */, |
80 GURL /* filesystem_url */) | 80 GURL /* filesystem_url */) |
81 | 81 |
82 // WebFrameClient::deleteFileSystem() message. | 82 // WebFrameClient::deleteFileSystem() message. |
83 IPC_MESSAGE_CONTROL3(FileSystemHostMsg_DeleteFileSystem, | 83 IPC_MESSAGE_CONTROL3(FileSystemHostMsg_DeleteFileSystem, |
84 int /* request_id */, | 84 int /* request_id */, |
85 GURL /* origin_url */, | 85 GURL /* origin_url */, |
86 fileapi::FileSystemType /* type */) | 86 storage::FileSystemType /* type */) |
87 | 87 |
88 // WebFileSystem::move() message. | 88 // WebFileSystem::move() message. |
89 IPC_MESSAGE_CONTROL3(FileSystemHostMsg_Move, | 89 IPC_MESSAGE_CONTROL3(FileSystemHostMsg_Move, |
90 int /* request_id */, | 90 int /* request_id */, |
91 GURL /* src path */, | 91 GURL /* src path */, |
92 GURL /* dest path */) | 92 GURL /* dest path */) |
93 | 93 |
94 // WebFileSystem::copy() message. | 94 // WebFileSystem::copy() message. |
95 IPC_MESSAGE_CONTROL3(FileSystemHostMsg_Copy, | 95 IPC_MESSAGE_CONTROL3(FileSystemHostMsg_Copy, |
96 int /* request_id */, | 96 int /* request_id */, |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
160 // Renderers are expected to send this message after having processed | 160 // Renderers are expected to send this message after having processed |
161 // the FileSystemMsg_DidCreateSnapshotFile message. In particular, | 161 // the FileSystemMsg_DidCreateSnapshotFile message. In particular, |
162 // after having created a BlobDataHandle backed by the snapshot file. | 162 // after having created a BlobDataHandle backed by the snapshot file. |
163 IPC_MESSAGE_CONTROL1(FileSystemHostMsg_DidReceiveSnapshotFile, | 163 IPC_MESSAGE_CONTROL1(FileSystemHostMsg_DidReceiveSnapshotFile, |
164 int /* request_id */) | 164 int /* request_id */) |
165 | 165 |
166 // For Pepper's URL loader. | 166 // For Pepper's URL loader. |
167 IPC_SYNC_MESSAGE_CONTROL1_1(FileSystemHostMsg_SyncGetPlatformPath, | 167 IPC_SYNC_MESSAGE_CONTROL1_1(FileSystemHostMsg_SyncGetPlatformPath, |
168 GURL /* file path */, | 168 GURL /* file path */, |
169 base::FilePath /* platform_path */) | 169 base::FilePath /* platform_path */) |
OLD | NEW |