OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 #ifndef CHROME_COMMON_PEPPER_FILE_MESSAGES_H_ | 5 #ifndef CHROME_COMMON_PEPPER_FILE_MESSAGES_H_ |
6 #define CHROME_COMMON_PEPPER_FILE_MESSAGES_H_ | 6 #define CHROME_COMMON_PEPPER_FILE_MESSAGES_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "chrome/common/common_param_traits.h" | 9 #include "chrome/common/common_param_traits.h" |
10 #include "ipc/ipc_message_macros.h" | 10 #include "ipc/ipc_message_macros.h" |
11 #include "ipc/ipc_param_traits.h" | 11 #include "ipc/ipc_param_traits.h" |
12 #include "ipc/ipc_platform_file.h" | 12 #include "ipc/ipc_platform_file.h" |
13 #include "webkit/glue/plugins/pepper_dir_contents.h" | 13 #include "webkit/plugins/ppapi/dir_contents.h" |
14 | 14 |
15 #define IPC_MESSAGE_START PepperFileMsgStart | 15 #define IPC_MESSAGE_START PepperFileMsgStart |
16 | 16 |
17 namespace IPC { | 17 namespace IPC { |
18 | 18 |
| 19 // Also needed for Serializing DirContents, which is just a vector of DirEntry. |
19 template <> | 20 template <> |
20 struct ParamTraits<PepperDirEntry> { | 21 struct ParamTraits<webkit::ppapi::DirEntry> { |
21 typedef PepperDirEntry param_type; | 22 typedef webkit::ppapi::DirEntry param_type; |
22 static void Write(Message* m, const param_type& p); | 23 static void Write(Message* m, const param_type& p); |
23 static bool Read(const Message* m, void** iter, param_type* p); | 24 static bool Read(const Message* m, void** iter, param_type* p); |
24 static void Log(const param_type& p, std::string* l); | 25 static void Log(const param_type& p, std::string* l); |
25 }; | 26 }; |
26 | 27 |
27 } // namespace IPC | 28 } // namespace IPC |
28 | 29 |
29 // Trusted Pepper Filesystem messages from the renderer to the browser. | 30 // Trusted Pepper Filesystem messages from the renderer to the browser. |
30 | 31 |
31 // Open the file. | 32 // Open the file. |
(...skipping 22 matching lines...) Expand all Loading... |
54 | 55 |
55 // Query the file's info. | 56 // Query the file's info. |
56 IPC_SYNC_MESSAGE_CONTROL1_2(PepperFileMsg_QueryFile, | 57 IPC_SYNC_MESSAGE_CONTROL1_2(PepperFileMsg_QueryFile, |
57 FilePath /* path */, | 58 FilePath /* path */, |
58 base::PlatformFileInfo, /* info */ | 59 base::PlatformFileInfo, /* info */ |
59 base::PlatformFileError /* error_code */) | 60 base::PlatformFileError /* error_code */) |
60 | 61 |
61 // Get the directory's contents. | 62 // Get the directory's contents. |
62 IPC_SYNC_MESSAGE_CONTROL1_2(PepperFileMsg_GetDirContents, | 63 IPC_SYNC_MESSAGE_CONTROL1_2(PepperFileMsg_GetDirContents, |
63 FilePath /* path */, | 64 FilePath /* path */, |
64 PepperDirContents, /* contents */ | 65 webkit::ppapi::DirContents, /* contents */ |
65 base::PlatformFileError /* error_code */) | 66 base::PlatformFileError /* error_code */) |
66 | 67 |
67 #endif // CHROME_COMMON_PEPPER_FILE_MESSAGES_H_ | 68 #endif // CHROME_COMMON_PEPPER_FILE_MESSAGES_H_ |
OLD | NEW |