| 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_INTERNAL_FILE_REF_BACKEND_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_PEPPER_PEPPER_INTERNAL_FILE_REF_BACKEND_H_ |
| 6 #define CONTENT_BROWSER_RENDERER_HOST_PEPPER_PEPPER_INTERNAL_FILE_REF_BACKEND_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_PEPPER_PEPPER_INTERNAL_FILE_REF_BACKEND_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "content/browser/renderer_host/pepper/pepper_file_ref_host.h" | 10 #include "content/browser/renderer_host/pepper/pepper_file_ref_host.h" |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 class PepperFileSystemBrowserHost; | 21 class PepperFileSystemBrowserHost; |
| 22 | 22 |
| 23 // Implementations of FileRef operations for internal filesystems. | 23 // Implementations of FileRef operations for internal filesystems. |
| 24 class PepperInternalFileRefBackend : public PepperFileRefBackend { | 24 class PepperInternalFileRefBackend : public PepperFileRefBackend { |
| 25 public: | 25 public: |
| 26 PepperInternalFileRefBackend( | 26 PepperInternalFileRefBackend( |
| 27 ppapi::host::PpapiHost* host, | 27 ppapi::host::PpapiHost* host, |
| 28 int render_process_id, | 28 int render_process_id, |
| 29 base::WeakPtr<PepperFileSystemBrowserHost> fs_host, | 29 base::WeakPtr<PepperFileSystemBrowserHost> fs_host, |
| 30 const std::string& path); | 30 const std::string& path); |
| 31 virtual ~PepperInternalFileRefBackend(); | 31 ~PepperInternalFileRefBackend() override; |
| 32 | 32 |
| 33 // PepperFileRefBackend overrides. | 33 // PepperFileRefBackend overrides. |
| 34 virtual int32_t MakeDirectory(ppapi::host::ReplyMessageContext context, | 34 int32_t MakeDirectory(ppapi::host::ReplyMessageContext context, |
| 35 int32_t make_directory_flags) override; | 35 int32_t make_directory_flags) override; |
| 36 virtual int32_t Touch(ppapi::host::ReplyMessageContext context, | 36 int32_t Touch(ppapi::host::ReplyMessageContext context, |
| 37 PP_Time last_accessed_time, | 37 PP_Time last_accessed_time, |
| 38 PP_Time last_modified_time) override; | 38 PP_Time last_modified_time) override; |
| 39 virtual int32_t Delete(ppapi::host::ReplyMessageContext context) override; | 39 int32_t Delete(ppapi::host::ReplyMessageContext context) override; |
| 40 virtual int32_t Rename(ppapi::host::ReplyMessageContext context, | 40 int32_t Rename(ppapi::host::ReplyMessageContext context, |
| 41 PepperFileRefHost* new_file_ref) override; | 41 PepperFileRefHost* new_file_ref) override; |
| 42 virtual int32_t Query(ppapi::host::ReplyMessageContext context) override; | 42 int32_t Query(ppapi::host::ReplyMessageContext context) override; |
| 43 virtual int32_t ReadDirectoryEntries(ppapi::host::ReplyMessageContext context) | 43 int32_t ReadDirectoryEntries( |
| 44 override; | 44 ppapi::host::ReplyMessageContext context) override; |
| 45 virtual int32_t GetAbsolutePath(ppapi::host::ReplyMessageContext context) | 45 int32_t GetAbsolutePath(ppapi::host::ReplyMessageContext context) override; |
| 46 override; | 46 storage::FileSystemURL GetFileSystemURL() const override; |
| 47 virtual storage::FileSystemURL GetFileSystemURL() const override; | 47 base::FilePath GetExternalFilePath() const override; |
| 48 virtual base::FilePath GetExternalFilePath() const override; | |
| 49 | 48 |
| 50 virtual int32_t CanRead() const override; | 49 int32_t CanRead() const override; |
| 51 virtual int32_t CanWrite() const override; | 50 int32_t CanWrite() const override; |
| 52 virtual int32_t CanCreate() const override; | 51 int32_t CanCreate() const override; |
| 53 virtual int32_t CanReadWrite() const override; | 52 int32_t CanReadWrite() const override; |
| 54 | 53 |
| 55 private: | 54 private: |
| 56 // Generic reply callback. | 55 // Generic reply callback. |
| 57 void DidFinish(ppapi::host::ReplyMessageContext reply_context, | 56 void DidFinish(ppapi::host::ReplyMessageContext reply_context, |
| 58 const IPC::Message& msg, | 57 const IPC::Message& msg, |
| 59 base::File::Error error); | 58 base::File::Error error); |
| 60 | 59 |
| 61 // Operation specific callbacks. | 60 // Operation specific callbacks. |
| 62 void GetMetadataComplete(ppapi::host::ReplyMessageContext reply_context, | 61 void GetMetadataComplete(ppapi::host::ReplyMessageContext reply_context, |
| 63 base::File::Error error, | 62 base::File::Error error, |
| (...skipping 16 matching lines...) Expand all Loading... |
| 80 mutable storage::FileSystemURL fs_url_; | 79 mutable storage::FileSystemURL fs_url_; |
| 81 | 80 |
| 82 base::WeakPtrFactory<PepperInternalFileRefBackend> weak_factory_; | 81 base::WeakPtrFactory<PepperInternalFileRefBackend> weak_factory_; |
| 83 | 82 |
| 84 DISALLOW_COPY_AND_ASSIGN(PepperInternalFileRefBackend); | 83 DISALLOW_COPY_AND_ASSIGN(PepperInternalFileRefBackend); |
| 85 }; | 84 }; |
| 86 | 85 |
| 87 } // namespace content | 86 } // namespace content |
| 88 | 87 |
| 89 #endif // CONTENT_BROWSER_RENDERER_HOST_PEPPER_PEPPER_INTERNAL_FILE_REF_BACKEND
_H_ | 88 #endif // CONTENT_BROWSER_RENDERER_HOST_PEPPER_PEPPER_INTERNAL_FILE_REF_BACKEND
_H_ |
| OLD | NEW |