Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(248)

Side by Side Diff: ppapi/proxy/ppapi_messages.h

Issue 130053003: [Pepper] Wire up append mode writing support of FileIO (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: s/max_written_offsets/file_sizes/g Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 header, no traditional include guard. 5 // Multiply-included message header, no traditional include guard.
6 #include <map> 6 #include <map>
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 #include "ppapi/proxy/host_resolver_private_resource.h" 52 #include "ppapi/proxy/host_resolver_private_resource.h"
53 #include "ppapi/proxy/network_list_resource.h" 53 #include "ppapi/proxy/network_list_resource.h"
54 #include "ppapi/proxy/ppapi_param_traits.h" 54 #include "ppapi/proxy/ppapi_param_traits.h"
55 #include "ppapi/proxy/ppapi_proxy_export.h" 55 #include "ppapi/proxy/ppapi_proxy_export.h"
56 #include "ppapi/proxy/resource_message_params.h" 56 #include "ppapi/proxy/resource_message_params.h"
57 #include "ppapi/proxy/serialized_flash_menu.h" 57 #include "ppapi/proxy/serialized_flash_menu.h"
58 #include "ppapi/proxy/serialized_handle.h" 58 #include "ppapi/proxy/serialized_handle.h"
59 #include "ppapi/proxy/serialized_structs.h" 59 #include "ppapi/proxy/serialized_structs.h"
60 #include "ppapi/proxy/serialized_var.h" 60 #include "ppapi/proxy/serialized_var.h"
61 #include "ppapi/shared_impl/dir_contents.h" 61 #include "ppapi/shared_impl/dir_contents.h"
62 #include "ppapi/shared_impl/file_growth.h"
62 #include "ppapi/shared_impl/file_path.h" 63 #include "ppapi/shared_impl/file_path.h"
63 #include "ppapi/shared_impl/file_ref_create_info.h" 64 #include "ppapi/shared_impl/file_ref_create_info.h"
64 #include "ppapi/shared_impl/ppapi_nacl_channel_args.h" 65 #include "ppapi/shared_impl/ppapi_nacl_channel_args.h"
65 #include "ppapi/shared_impl/ppapi_preferences.h" 66 #include "ppapi/shared_impl/ppapi_preferences.h"
66 #include "ppapi/shared_impl/ppb_device_ref_shared.h" 67 #include "ppapi/shared_impl/ppb_device_ref_shared.h"
67 #include "ppapi/shared_impl/ppb_input_event_shared.h" 68 #include "ppapi/shared_impl/ppb_input_event_shared.h"
68 #include "ppapi/shared_impl/ppb_tcp_socket_shared.h" 69 #include "ppapi/shared_impl/ppb_tcp_socket_shared.h"
69 #include "ppapi/shared_impl/ppb_view_shared.h" 70 #include "ppapi/shared_impl/ppb_view_shared.h"
70 #include "ppapi/shared_impl/ppp_flash_browser_operations_shared.h" 71 #include "ppapi/shared_impl/ppp_flash_browser_operations_shared.h"
71 #include "ppapi/shared_impl/private/ppb_x509_certificate_private_shared.h" 72 #include "ppapi/shared_impl/private/ppb_x509_certificate_private_shared.h"
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 204
204 IPC_STRUCT_TRAITS_BEGIN(PP_FileInfo) 205 IPC_STRUCT_TRAITS_BEGIN(PP_FileInfo)
205 IPC_STRUCT_TRAITS_MEMBER(size) 206 IPC_STRUCT_TRAITS_MEMBER(size)
206 IPC_STRUCT_TRAITS_MEMBER(type) 207 IPC_STRUCT_TRAITS_MEMBER(type)
207 IPC_STRUCT_TRAITS_MEMBER(system_type) 208 IPC_STRUCT_TRAITS_MEMBER(system_type)
208 IPC_STRUCT_TRAITS_MEMBER(creation_time) 209 IPC_STRUCT_TRAITS_MEMBER(creation_time)
209 IPC_STRUCT_TRAITS_MEMBER(last_access_time) 210 IPC_STRUCT_TRAITS_MEMBER(last_access_time)
210 IPC_STRUCT_TRAITS_MEMBER(last_modified_time) 211 IPC_STRUCT_TRAITS_MEMBER(last_modified_time)
211 IPC_STRUCT_TRAITS_END() 212 IPC_STRUCT_TRAITS_END()
212 213
214 IPC_STRUCT_TRAITS_BEGIN(ppapi::FileGrowth)
215 IPC_STRUCT_TRAITS_MEMBER(max_written_offset)
216 IPC_STRUCT_TRAITS_MEMBER(append_mode_write_amount)
217 IPC_STRUCT_TRAITS_END()
218
213 IPC_STRUCT_TRAITS_BEGIN(ppapi::DeviceRefData) 219 IPC_STRUCT_TRAITS_BEGIN(ppapi::DeviceRefData)
214 IPC_STRUCT_TRAITS_MEMBER(type) 220 IPC_STRUCT_TRAITS_MEMBER(type)
215 IPC_STRUCT_TRAITS_MEMBER(name) 221 IPC_STRUCT_TRAITS_MEMBER(name)
216 IPC_STRUCT_TRAITS_MEMBER(id) 222 IPC_STRUCT_TRAITS_MEMBER(id)
217 IPC_STRUCT_TRAITS_END() 223 IPC_STRUCT_TRAITS_END()
218 224
219 IPC_STRUCT_TRAITS_BEGIN(ppapi::DirEntry) 225 IPC_STRUCT_TRAITS_BEGIN(ppapi::DirEntry)
220 IPC_STRUCT_TRAITS_MEMBER(name) 226 IPC_STRUCT_TRAITS_MEMBER(name)
221 IPC_STRUCT_TRAITS_MEMBER(is_dir) 227 IPC_STRUCT_TRAITS_MEMBER(is_dir)
222 IPC_STRUCT_TRAITS_END() 228 IPC_STRUCT_TRAITS_END()
(...skipping 998 matching lines...) Expand 10 before | Expand all | Expand 10 after
1221 IPC_MESSAGE_CONTROL1(PpapiPluginMsg_FileChooser_ShowReply, 1227 IPC_MESSAGE_CONTROL1(PpapiPluginMsg_FileChooser_ShowReply,
1222 std::vector<ppapi::FileRefCreateInfo> /* files */) 1228 std::vector<ppapi::FileRefCreateInfo> /* files */)
1223 1229
1224 // FileIO 1230 // FileIO
1225 IPC_MESSAGE_CONTROL0(PpapiHostMsg_FileIO_Create) 1231 IPC_MESSAGE_CONTROL0(PpapiHostMsg_FileIO_Create)
1226 IPC_MESSAGE_CONTROL2(PpapiHostMsg_FileIO_Open, 1232 IPC_MESSAGE_CONTROL2(PpapiHostMsg_FileIO_Open,
1227 PP_Resource /* file_ref_resource */, 1233 PP_Resource /* file_ref_resource */,
1228 int32_t /* open_flags */) 1234 int32_t /* open_flags */)
1229 IPC_MESSAGE_CONTROL2(PpapiPluginMsg_FileIO_OpenReply, 1235 IPC_MESSAGE_CONTROL2(PpapiPluginMsg_FileIO_OpenReply,
1230 PP_Resource /* quota_file_system */, 1236 PP_Resource /* quota_file_system */,
1231 int64_t /* max_written_offset */) 1237 int64_t /* file_size */)
1232 IPC_MESSAGE_CONTROL1(PpapiHostMsg_FileIO_Close, 1238 IPC_MESSAGE_CONTROL1(PpapiHostMsg_FileIO_Close,
1233 int64_t /* max_written_offset */) 1239 ppapi::FileGrowth /* file_growth */)
1234 IPC_MESSAGE_CONTROL2(PpapiHostMsg_FileIO_Touch, 1240 IPC_MESSAGE_CONTROL2(PpapiHostMsg_FileIO_Touch,
1235 PP_Time /* last_access_time */, 1241 PP_Time /* last_access_time */,
1236 PP_Time /* last_modified_time */) 1242 PP_Time /* last_modified_time */)
1237 IPC_MESSAGE_CONTROL1(PpapiHostMsg_FileIO_SetLength, 1243 IPC_MESSAGE_CONTROL1(PpapiHostMsg_FileIO_SetLength,
1238 int64_t /* length */) 1244 int64_t /* length */)
1239 IPC_MESSAGE_CONTROL0(PpapiHostMsg_FileIO_Flush) 1245 IPC_MESSAGE_CONTROL0(PpapiHostMsg_FileIO_Flush)
1240 IPC_MESSAGE_CONTROL0(PpapiHostMsg_FileIO_RequestOSFileHandle) 1246 IPC_MESSAGE_CONTROL0(PpapiHostMsg_FileIO_RequestOSFileHandle)
1241 IPC_MESSAGE_CONTROL0(PpapiPluginMsg_FileIO_RequestOSFileHandleReply) 1247 IPC_MESSAGE_CONTROL0(PpapiPluginMsg_FileIO_RequestOSFileHandleReply)
1242 IPC_MESSAGE_CONTROL0(PpapiPluginMsg_FileIO_GeneralReply) 1248 IPC_MESSAGE_CONTROL0(PpapiPluginMsg_FileIO_GeneralReply)
1243 1249
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
1312 // Passed from renderer to browser. Creates an already-open file system with a 1318 // Passed from renderer to browser. Creates an already-open file system with a
1313 // given |root_url| and |file_system_type|. 1319 // given |root_url| and |file_system_type|.
1314 IPC_MESSAGE_CONTROL2(PpapiHostMsg_FileSystem_CreateFromRenderer, 1320 IPC_MESSAGE_CONTROL2(PpapiHostMsg_FileSystem_CreateFromRenderer,
1315 std::string /* root_url */, 1321 std::string /* root_url */,
1316 PP_FileSystemType /* file_system_type */) 1322 PP_FileSystemType /* file_system_type */)
1317 // Nested within a ResourceVar for file systems being passed from the renderer 1323 // Nested within a ResourceVar for file systems being passed from the renderer
1318 // to the plugin. Creates an already-open file system resource on the plugin, 1324 // to the plugin. Creates an already-open file system resource on the plugin,
1319 // linked to the existing resource host given in the ResourceVar. 1325 // linked to the existing resource host given in the ResourceVar.
1320 IPC_MESSAGE_CONTROL1(PpapiPluginMsg_FileSystem_CreateFromPendingHost, 1326 IPC_MESSAGE_CONTROL1(PpapiPluginMsg_FileSystem_CreateFromPendingHost,
1321 PP_FileSystemType /* file_system_type */) 1327 PP_FileSystemType /* file_system_type */)
1322 // IPC_MESSAGE macros choke on extra , in the std::map, when expanding. We need
1323 // to typedef it to avoid that.
1324 typedef std::map<int32_t, int64_t> FileOffsetMap;
1325 IPC_MESSAGE_CONTROL2(PpapiHostMsg_FileSystem_ReserveQuota, 1328 IPC_MESSAGE_CONTROL2(PpapiHostMsg_FileSystem_ReserveQuota,
1326 int64_t /* amount */, 1329 int64_t /* amount */,
1327 FileOffsetMap /* max_written_offsets */) 1330 ppapi::FileGrowthMap /* file_growths */)
1328 IPC_MESSAGE_CONTROL2(PpapiPluginMsg_FileSystem_ReserveQuotaReply, 1331 IPC_MESSAGE_CONTROL2(PpapiPluginMsg_FileSystem_ReserveQuotaReply,
1329 int64_t /* amount */, 1332 int64_t /* amount */,
1330 FileOffsetMap /* max_written_offsets */) 1333 ppapi::FileSizeMap /* file_sizes */)
1331 1334
1332 // Flash DRM ------------------------------------------------------------------ 1335 // Flash DRM ------------------------------------------------------------------
1333 IPC_MESSAGE_CONTROL0(PpapiHostMsg_FlashDRM_Create) 1336 IPC_MESSAGE_CONTROL0(PpapiHostMsg_FlashDRM_Create)
1334 1337
1335 // Requests the device ID. 1338 // Requests the device ID.
1336 IPC_MESSAGE_CONTROL0(PpapiHostMsg_FlashDRM_GetDeviceID) 1339 IPC_MESSAGE_CONTROL0(PpapiHostMsg_FlashDRM_GetDeviceID)
1337 // Reply for GetDeviceID which includes the device ID as a string. 1340 // Reply for GetDeviceID which includes the device ID as a string.
1338 IPC_MESSAGE_CONTROL1(PpapiPluginMsg_FlashDRM_GetDeviceIDReply, 1341 IPC_MESSAGE_CONTROL1(PpapiPluginMsg_FlashDRM_GetDeviceIDReply,
1339 std::string /* id */) 1342 std::string /* id */)
1340 1343
(...skipping 688 matching lines...) Expand 10 before | Expand all | Expand 10 after
2029 IPC_MESSAGE_CONTROL1(PpapiHostMsg_Talk_RequestPermission, 2032 IPC_MESSAGE_CONTROL1(PpapiHostMsg_Talk_RequestPermission,
2030 PP_TalkPermission /* permission */) 2033 PP_TalkPermission /* permission */)
2031 IPC_MESSAGE_CONTROL0(PpapiPluginMsg_Talk_RequestPermissionReply) 2034 IPC_MESSAGE_CONTROL0(PpapiPluginMsg_Talk_RequestPermissionReply)
2032 IPC_MESSAGE_CONTROL0(PpapiHostMsg_Talk_StartRemoting) 2035 IPC_MESSAGE_CONTROL0(PpapiHostMsg_Talk_StartRemoting)
2033 IPC_MESSAGE_CONTROL0(PpapiPluginMsg_Talk_StartRemotingReply) 2036 IPC_MESSAGE_CONTROL0(PpapiPluginMsg_Talk_StartRemotingReply)
2034 IPC_MESSAGE_CONTROL0(PpapiHostMsg_Talk_StopRemoting) 2037 IPC_MESSAGE_CONTROL0(PpapiHostMsg_Talk_StopRemoting)
2035 IPC_MESSAGE_CONTROL0(PpapiPluginMsg_Talk_StopRemotingReply) 2038 IPC_MESSAGE_CONTROL0(PpapiPluginMsg_Talk_StopRemotingReply)
2036 IPC_MESSAGE_CONTROL1(PpapiPluginMsg_Talk_NotifyEvent, PP_TalkEvent /* event */) 2039 IPC_MESSAGE_CONTROL1(PpapiPluginMsg_Talk_NotifyEvent, PP_TalkEvent /* event */)
2037 2040
2038 #endif // !defined(OS_NACL) && !defined(NACL_WIN64) 2041 #endif // !defined(OS_NACL) && !defined(NACL_WIN64)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698