| 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_file_ref_host.h" | 5 #include "content/browser/renderer_host/pepper/pepper_file_ref_host.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "content/browser/renderer_host/pepper/pepper_external_file_ref_backend.
h" | 9 #include "content/browser/renderer_host/pepper/pepper_external_file_ref_backend.
h" |
| 10 #include "content/browser/renderer_host/pepper/pepper_file_system_browser_host.h
" | 10 #include "content/browser/renderer_host/pepper/pepper_file_system_browser_host.h
" |
| 11 #include "content/browser/renderer_host/pepper/pepper_internal_file_ref_backend.
h" | 11 #include "content/browser/renderer_host/pepper/pepper_internal_file_ref_backend.
h" |
| 12 #include "ppapi/c/pp_errors.h" | 12 #include "ppapi/c/pp_errors.h" |
| 13 #include "ppapi/c/pp_file_info.h" | 13 #include "ppapi/c/pp_file_info.h" |
| 14 #include "ppapi/c/pp_instance.h" | 14 #include "ppapi/c/pp_instance.h" |
| 15 #include "ppapi/c/pp_resource.h" | 15 #include "ppapi/c/pp_resource.h" |
| 16 #include "ppapi/host/dispatch_host_message.h" | 16 #include "ppapi/host/dispatch_host_message.h" |
| 17 #include "ppapi/host/ppapi_host.h" | 17 #include "ppapi/host/ppapi_host.h" |
| 18 #include "ppapi/proxy/ppapi_messages.h" | 18 #include "ppapi/proxy/ppapi_messages.h" |
| 19 #include "ppapi/shared_impl/file_ref_util.h" | 19 #include "ppapi/shared_impl/file_ref_util.h" |
| 20 #include "webkit/browser/fileapi/file_permission_policy.h" | 20 #include "storage/browser/fileapi/file_permission_policy.h" |
| 21 | 21 |
| 22 using ppapi::host::ResourceHost; | 22 using ppapi::host::ResourceHost; |
| 23 | 23 |
| 24 namespace content { | 24 namespace content { |
| 25 | 25 |
| 26 PepperFileRefBackend::~PepperFileRefBackend() {} | 26 PepperFileRefBackend::~PepperFileRefBackend() {} |
| 27 | 27 |
| 28 PepperFileRefHost::PepperFileRefHost(BrowserPpapiHost* host, | 28 PepperFileRefHost::PepperFileRefHost(BrowserPpapiHost* host, |
| 29 PP_Instance instance, | 29 PP_Instance instance, |
| 30 PP_Resource resource, | 30 PP_Resource resource, |
| (...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 241 | 241 |
| 242 int32_t PepperFileRefHost::OnGetAbsolutePath( | 242 int32_t PepperFileRefHost::OnGetAbsolutePath( |
| 243 ppapi::host::HostMessageContext* context) { | 243 ppapi::host::HostMessageContext* context) { |
| 244 if (!host_->GetPpapiHost()->permissions().HasPermission( | 244 if (!host_->GetPpapiHost()->permissions().HasPermission( |
| 245 ppapi::PERMISSION_PRIVATE)) | 245 ppapi::PERMISSION_PRIVATE)) |
| 246 return PP_ERROR_NOACCESS; | 246 return PP_ERROR_NOACCESS; |
| 247 return backend_->GetAbsolutePath(context->MakeReplyMessageContext()); | 247 return backend_->GetAbsolutePath(context->MakeReplyMessageContext()); |
| 248 } | 248 } |
| 249 | 249 |
| 250 } // namespace content | 250 } // namespace content |
| OLD | NEW |