OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 #include "ppapi/proxy/file_ref_resource.h" | 5 #include "ppapi/proxy/file_ref_resource.h" |
6 | 6 |
7 #include "ppapi/c/pp_directory_entry.h" | 7 #include "ppapi/c/pp_directory_entry.h" |
8 #include "ppapi/c/pp_instance.h" | 8 #include "ppapi/c/pp_instance.h" |
9 #include "ppapi/c/pp_resource.h" | 9 #include "ppapi/c/pp_resource.h" |
10 #include "ppapi/proxy/ppapi_messages.h" | 10 #include "ppapi/proxy/ppapi_messages.h" |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
122 parent_info.display_name = GetNameForInternalFilePath(parent_path); | 122 parent_info.display_name = GetNameForInternalFilePath(parent_path); |
123 parent_info.file_system_plugin_resource = | 123 parent_info.file_system_plugin_resource = |
124 create_info_.file_system_plugin_resource; | 124 create_info_.file_system_plugin_resource; |
125 | 125 |
126 return (new FileRefResource(connection(), | 126 return (new FileRefResource(connection(), |
127 pp_instance(), | 127 pp_instance(), |
128 parent_info))->GetReference(); | 128 parent_info))->GetReference(); |
129 } | 129 } |
130 | 130 |
131 int32_t FileRefResource::MakeDirectory( | 131 int32_t FileRefResource::MakeDirectory( |
132 PP_Bool make_ancestors, | 132 int32_t make_directory_flags, |
133 scoped_refptr<TrackedCallback> callback) { | 133 scoped_refptr<TrackedCallback> callback) { |
134 Call<PpapiPluginMsg_FileRef_MakeDirectoryReply>( | 134 Call<PpapiPluginMsg_FileRef_MakeDirectoryReply>( |
135 BROWSER, | 135 BROWSER, |
136 PpapiHostMsg_FileRef_MakeDirectory(PP_TRUE == make_ancestors), | 136 PpapiHostMsg_FileRef_MakeDirectory(make_directory_flags), |
137 base::Bind(&FileRefResource::RunTrackedCallback, this, callback)); | 137 base::Bind(&FileRefResource::RunTrackedCallback, this, callback)); |
138 return PP_OK_COMPLETIONPENDING; | 138 return PP_OK_COMPLETIONPENDING; |
139 } | 139 } |
140 | 140 |
141 int32_t FileRefResource::Touch(PP_Time last_access_time, | 141 int32_t FileRefResource::Touch(PP_Time last_access_time, |
142 PP_Time last_modified_time, | 142 PP_Time last_modified_time, |
143 scoped_refptr<TrackedCallback> callback) { | 143 scoped_refptr<TrackedCallback> callback) { |
144 Call<PpapiPluginMsg_FileRef_TouchReply>( | 144 Call<PpapiPluginMsg_FileRef_TouchReply>( |
145 BROWSER, | 145 BROWSER, |
146 PpapiHostMsg_FileRef_Touch(last_access_time, | 146 PpapiHostMsg_FileRef_Touch(last_access_time, |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
251 entries.push_back(entry); | 251 entries.push_back(entry); |
252 } | 252 } |
253 | 253 |
254 writer.StoreVector(entries); | 254 writer.StoreVector(entries); |
255 } | 255 } |
256 callback->Run(params.result()); | 256 callback->Run(params.result()); |
257 } | 257 } |
258 | 258 |
259 } // namespace proxy | 259 } // namespace proxy |
260 } // namespace ppapi | 260 } // namespace ppapi |
OLD | NEW |