| 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 #ifndef CONTENT_BROWSER_RENDERER_HOST_PEPPER_PEPPER_FILE_IO_HOST_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_PEPPER_PEPPER_FILE_IO_HOST_H_ |
| 6 #define CONTENT_BROWSER_RENDERER_HOST_PEPPER_PEPPER_FILE_IO_HOST_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_PEPPER_PEPPER_FILE_IO_HOST_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <string> | 10 #include <string> |
| 11 | 11 |
| 12 #include "base/callback_forward.h" | 12 #include "base/callback_forward.h" |
| 13 #include "base/files/file.h" | 13 #include "base/files/file.h" |
| 14 #include "base/files/file_proxy.h" | 14 #include "base/files/file_proxy.h" |
| 15 #include "base/macros.h" | 15 #include "base/macros.h" |
| 16 #include "base/memory/weak_ptr.h" | 16 #include "base/memory/weak_ptr.h" |
| 17 #include "content/browser/renderer_host/pepper/browser_ppapi_host_impl.h" | 17 #include "content/browser/renderer_host/pepper/browser_ppapi_host_impl.h" |
| 18 #include "content/public/common/quarantine.h" |
| 18 #include "ipc/ipc_listener.h" | 19 #include "ipc/ipc_listener.h" |
| 19 #include "ipc/ipc_platform_file.h" | 20 #include "ipc/ipc_platform_file.h" |
| 20 #include "ppapi/c/pp_file_info.h" | 21 #include "ppapi/c/pp_file_info.h" |
| 21 #include "ppapi/c/pp_time.h" | 22 #include "ppapi/c/pp_time.h" |
| 22 #include "ppapi/host/host_message_context.h" | 23 #include "ppapi/host/host_message_context.h" |
| 23 #include "ppapi/host/resource_host.h" | 24 #include "ppapi/host/resource_host.h" |
| 24 #include "ppapi/shared_impl/file_io_state_manager.h" | 25 #include "ppapi/shared_impl/file_io_state_manager.h" |
| 25 #include "storage/browser/fileapi/file_system_context.h" | 26 #include "storage/browser/fileapi/file_system_context.h" |
| 26 #include "url/gurl.h" | 27 #include "url/gurl.h" |
| 27 | 28 |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 75 bool plugin_allowed); | 76 bool plugin_allowed); |
| 76 | 77 |
| 77 // Callback handlers. These mostly convert the File::Error to the | 78 // Callback handlers. These mostly convert the File::Error to the |
| 78 // PP_Error code and send back the reply. Note that the argument | 79 // PP_Error code and send back the reply. Note that the argument |
| 79 // ReplyMessageContext is copied so that we have a closure containing all | 80 // ReplyMessageContext is copied so that we have a closure containing all |
| 80 // necessary information to reply. | 81 // necessary information to reply. |
| 81 void ExecutePlatformGeneralCallback( | 82 void ExecutePlatformGeneralCallback( |
| 82 ppapi::host::ReplyMessageContext reply_context, | 83 ppapi::host::ReplyMessageContext reply_context, |
| 83 base::File::Error error_code); | 84 base::File::Error error_code); |
| 84 | 85 |
| 85 void OnOpenProxyCallback(ppapi::host::ReplyMessageContext reply_context, | 86 void OnLocalFileOpened(ppapi::host::ReplyMessageContext reply_context, |
| 86 base::File::Error error_code); | 87 const base::FilePath& path, |
| 88 base::File::Error error_code); |
| 89 |
| 90 void OnLocalFileQuarantined(ppapi::host::ReplyMessageContext reply_context, |
| 91 const base::FilePath& path, |
| 92 QuarantineFileResult quarantine_result); |
| 93 |
| 94 void SendFileOpenReply(ppapi::host::ReplyMessageContext reply_context, |
| 95 base::File::Error error_code); |
| 87 | 96 |
| 88 void GotUIThreadStuffForInternalFileSystems( | 97 void GotUIThreadStuffForInternalFileSystems( |
| 89 ppapi::host::ReplyMessageContext reply_context, | 98 ppapi::host::ReplyMessageContext reply_context, |
| 90 int platform_file_flags, | 99 int platform_file_flags, |
| 91 UIThreadStuff ui_thread_stuff); | 100 UIThreadStuff ui_thread_stuff); |
| 92 void DidOpenInternalFile(ppapi::host::ReplyMessageContext reply_context, | 101 void DidOpenInternalFile(ppapi::host::ReplyMessageContext reply_context, |
| 93 base::File file, | 102 base::File file, |
| 94 const base::Closure& on_close_callback); | 103 const base::Closure& on_close_callback); |
| 95 void GotResolvedRenderProcessId( | 104 void GotResolvedRenderProcessId( |
| 96 ppapi::host::ReplyMessageContext reply_context, | 105 ppapi::host::ReplyMessageContext reply_context, |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 135 bool check_quota_; | 144 bool check_quota_; |
| 136 | 145 |
| 137 ppapi::FileIOStateManager state_manager_; | 146 ppapi::FileIOStateManager state_manager_; |
| 138 | 147 |
| 139 DISALLOW_COPY_AND_ASSIGN(PepperFileIOHost); | 148 DISALLOW_COPY_AND_ASSIGN(PepperFileIOHost); |
| 140 }; | 149 }; |
| 141 | 150 |
| 142 } // namespace content | 151 } // namespace content |
| 143 | 152 |
| 144 #endif // CONTENT_BROWSER_RENDERER_HOST_PEPPER_PEPPER_FILE_IO_HOST_H_ | 153 #endif // CONTENT_BROWSER_RENDERER_HOST_PEPPER_PEPPER_FILE_IO_HOST_H_ |
| OLD | NEW |