| 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 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 204 // TODO(teravest): Remove this when we are finished moving to the new proxy. | 204 // TODO(teravest): Remove this when we are finished moving to the new proxy. |
| 205 int32_t FileRefResource::ReadDirectoryEntriesInHost( | 205 int32_t FileRefResource::ReadDirectoryEntriesInHost( |
| 206 linked_ptr<std::vector<ppapi::PPB_FileRef_CreateInfo> > files, | 206 linked_ptr<std::vector<ppapi::PPB_FileRef_CreateInfo> > files, |
| 207 linked_ptr<std::vector<PP_FileType> > file_types, | 207 linked_ptr<std::vector<PP_FileType> > file_types, |
| 208 scoped_refptr<TrackedCallback> callback) { | 208 scoped_refptr<TrackedCallback> callback) { |
| 209 NOTREACHED(); | 209 NOTREACHED(); |
| 210 return PP_ERROR_FAILED; | 210 return PP_ERROR_FAILED; |
| 211 } | 211 } |
| 212 | 212 |
| 213 PP_Var FileRefResource::GetAbsolutePath() { | 213 PP_Var FileRefResource::GetAbsolutePath() { |
| 214 if (!absolute_path_var_) { | 214 if (!absolute_path_var_.get()) { |
| 215 std::string absolute_path; | 215 std::string absolute_path; |
| 216 int32_t result = SyncCall<PpapiPluginMsg_FileRef_GetAbsolutePathReply>( | 216 int32_t result = SyncCall<PpapiPluginMsg_FileRef_GetAbsolutePathReply>( |
| 217 BROWSER, PpapiHostMsg_FileRef_GetAbsolutePath(), &absolute_path); | 217 BROWSER, PpapiHostMsg_FileRef_GetAbsolutePath(), &absolute_path); |
| 218 if (result != PP_OK) | 218 if (result != PP_OK) |
| 219 return PP_MakeUndefined(); | 219 return PP_MakeUndefined(); |
| 220 absolute_path_var_ = new StringVar(absolute_path); | 220 absolute_path_var_ = new StringVar(absolute_path); |
| 221 } | 221 } |
| 222 return absolute_path_var_->GetPPVar(); | 222 return absolute_path_var_->GetPPVar(); |
| 223 } | 223 } |
| 224 | 224 |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 268 entries.push_back(entry); | 268 entries.push_back(entry); |
| 269 } | 269 } |
| 270 | 270 |
| 271 writer.StoreVector(entries); | 271 writer.StoreVector(entries); |
| 272 } | 272 } |
| 273 callback->Run(params.result()); | 273 callback->Run(params.result()); |
| 274 } | 274 } |
| 275 | 275 |
| 276 } // namespace proxy | 276 } // namespace proxy |
| 277 } // namespace ppapi | 277 } // namespace ppapi |
| OLD | NEW |