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 // Multiply-included message file, so no include guard. | 5 // Multiply-included message file, so no include guard. |
6 | 6 |
7 #include "base/time.h" | 7 #include "base/time.h" |
8 #include "content/public/common/common_param_traits.h" | 8 #include "content/public/common/common_param_traits.h" |
9 #include "ipc/ipc_message_macros.h" | 9 #include "ipc/ipc_message_macros.h" |
10 #include "ipc/ipc_param_traits.h" | 10 #include "ipc/ipc_param_traits.h" |
11 #include "ipc/ipc_platform_file.h" | 11 #include "ipc/ipc_platform_file.h" |
12 | 12 |
13 #define IPC_MESSAGE_START FileUtilitiesMsgStart | 13 #define IPC_MESSAGE_START FileUtilitiesMsgStart |
14 | 14 |
15 // File utilities messages sent from the renderer to the browser. | 15 // File utilities messages sent from the renderer to the browser. |
16 | 16 |
17 // Get file size in bytes. Set result to -1 if failed to get the file size. | |
18 IPC_SYNC_MESSAGE_CONTROL1_1(FileUtilitiesMsg_GetFileSize, | |
19 FilePath /* path */, | |
20 int64 /* result */) | |
21 | |
22 // Get file modification time in seconds. Set result to 0 if failed to get the | |
23 // file modification time. | |
24 IPC_SYNC_MESSAGE_CONTROL1_1(FileUtilitiesMsg_GetFileModificationTime, | |
25 FilePath /* path */, | |
26 base::Time /* result */) | |
27 | |
28 IPC_SYNC_MESSAGE_CONTROL1_2(FileUtilitiesMsg_GetFileInfo, | 17 IPC_SYNC_MESSAGE_CONTROL1_2(FileUtilitiesMsg_GetFileInfo, |
29 FilePath /* path */, | 18 FilePath /* path */, |
30 base::PlatformFileInfo /* result */, | 19 base::PlatformFileInfo /* result */, |
31 base::PlatformFileError /* status */) | 20 base::PlatformFileError /* status */) |
32 | 21 |
33 // Open the file. | 22 // Open the file. |
34 IPC_SYNC_MESSAGE_CONTROL2_1(FileUtilitiesMsg_OpenFile, | 23 IPC_SYNC_MESSAGE_CONTROL2_1(FileUtilitiesMsg_OpenFile, |
35 FilePath /* path */, | 24 FilePath /* path */, |
36 int /* mode */, | 25 int /* mode */, |
37 IPC::PlatformFileForTransit /* result */) | 26 IPC::PlatformFileForTransit /* result */) |
OLD | NEW |