| 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 "content/browser/renderer_host/pepper/pepper_external_file_ref_backend.
h" | 5 #include "content/browser/renderer_host/pepper/pepper_external_file_ref_backend.
h" |
| 6 | 6 |
| 7 #include "base/files/file_path.h" | 7 #include "base/files/file_path.h" |
| 8 #include "base/files/file_util_proxy.h" | 8 #include "base/files/file_util_proxy.h" |
| 9 #include "content/browser/child_process_security_policy_impl.h" | 9 #include "content/browser/child_process_security_policy_impl.h" |
| 10 #include "content/public/browser/browser_thread.h" | 10 #include "content/public/browser/browser_thread.h" |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 83 int32_t PepperExternalFileRefBackend::ReadDirectoryEntries( | 83 int32_t PepperExternalFileRefBackend::ReadDirectoryEntries( |
| 84 ppapi::host::ReplyMessageContext context) { | 84 ppapi::host::ReplyMessageContext context) { |
| 85 // This operation isn't supported for external filesystems. | 85 // This operation isn't supported for external filesystems. |
| 86 return PP_ERROR_NOACCESS; | 86 return PP_ERROR_NOACCESS; |
| 87 } | 87 } |
| 88 | 88 |
| 89 int32_t PepperExternalFileRefBackend::GetAbsolutePath( | 89 int32_t PepperExternalFileRefBackend::GetAbsolutePath( |
| 90 ppapi::host::ReplyMessageContext reply_context) { | 90 ppapi::host::ReplyMessageContext reply_context) { |
| 91 host_->SendReply(reply_context, | 91 host_->SendReply(reply_context, |
| 92 PpapiPluginMsg_FileRef_GetAbsolutePathReply(path_.AsUTF8Unsafe())); | 92 PpapiPluginMsg_FileRef_GetAbsolutePathReply(path_.AsUTF8Unsafe())); |
| 93 return PP_OK; | 93 |
| 94 // Use PP_OK_COMPLETIONPENDING instead of PP_OK since we've already sent our |
| 95 // reply above. |
| 96 return PP_OK_COMPLETIONPENDING; |
| 94 } | 97 } |
| 95 | 98 |
| 96 fileapi::FileSystemURL PepperExternalFileRefBackend::GetFileSystemURL() const { | 99 fileapi::FileSystemURL PepperExternalFileRefBackend::GetFileSystemURL() const { |
| 97 return fileapi::FileSystemURL(); | 100 return fileapi::FileSystemURL(); |
| 98 } | 101 } |
| 99 | 102 |
| 100 std::string PepperExternalFileRefBackend::GetFileSystemURLSpec() const { | 103 std::string PepperExternalFileRefBackend::GetFileSystemURLSpec() const { |
| 101 return std::string(); | 104 return std::string(); |
| 102 } | 105 } |
| 103 | 106 |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 159 file_info, PP_FILESYSTEMTYPE_EXTERNAL, &pp_file_info); | 162 file_info, PP_FILESYSTEMTYPE_EXTERNAL, &pp_file_info); |
| 160 } else { | 163 } else { |
| 161 memset(&pp_file_info, 0, sizeof(pp_file_info)); | 164 memset(&pp_file_info, 0, sizeof(pp_file_info)); |
| 162 } | 165 } |
| 163 | 166 |
| 164 host_->SendReply(reply_context, | 167 host_->SendReply(reply_context, |
| 165 PpapiPluginMsg_FileRef_QueryReply(pp_file_info)); | 168 PpapiPluginMsg_FileRef_QueryReply(pp_file_info)); |
| 166 } | 169 } |
| 167 | 170 |
| 168 } // namespace content | 171 } // namespace content |
| OLD | NEW |