| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 PPAPI_PROXY_FILE_SYSTEM_RESOURCE_H_ | 5 #ifndef PPAPI_PROXY_FILE_SYSTEM_RESOURCE_H_ |
| 6 #define PPAPI_PROXY_FILE_SYSTEM_RESOURCE_H_ | 6 #define PPAPI_PROXY_FILE_SYSTEM_RESOURCE_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 // Resource overrides. | 43 // Resource overrides. |
| 44 virtual thunk::PPB_FileSystem_API* AsPPB_FileSystem_API() OVERRIDE; | 44 virtual thunk::PPB_FileSystem_API* AsPPB_FileSystem_API() OVERRIDE; |
| 45 | 45 |
| 46 // PPB_FileSystem_API implementation. | 46 // PPB_FileSystem_API implementation. |
| 47 virtual int32_t Open(int64_t expected_size, | 47 virtual int32_t Open(int64_t expected_size, |
| 48 scoped_refptr<TrackedCallback> callback) OVERRIDE; | 48 scoped_refptr<TrackedCallback> callback) OVERRIDE; |
| 49 virtual PP_FileSystemType GetType() OVERRIDE; | 49 virtual PP_FileSystemType GetType() OVERRIDE; |
| 50 | 50 |
| 51 int32_t InitIsolatedFileSystem(const std::string& fsid, | 51 int32_t InitIsolatedFileSystem(const std::string& fsid, |
| 52 const base::Callback<void(int32_t)>& callback); | 52 const base::Callback<void(int32_t)>& callback); |
| 53 int32_t OpenPluginPrivateFileSystem( |
| 54 const base::Callback<void(int32_t)>& callback); |
| 55 |
| 53 private: | 56 private: |
| 54 // Called when the host has responded to our open request. | 57 // Called when the host has responded to our open request. |
| 55 void OpenComplete(scoped_refptr<TrackedCallback> callback, | 58 void OpenComplete(scoped_refptr<TrackedCallback> callback, |
| 56 const ResourceMessageReplyParams& params); | 59 const ResourceMessageReplyParams& params); |
| 57 | 60 |
| 58 // Called when the host has responded to our InitIsolatedFileSystem request. | 61 // Called when the host has responded to our InitIsolatedFileSystem request. |
| 59 void InitIsolatedFileSystemComplete( | 62 void InitIsolatedFileSystemComplete( |
| 60 const base::Callback<void(int32_t)>& callback, | 63 const base::Callback<void(int32_t)>& callback, |
| 61 const ResourceMessageReplyParams& params); | 64 const ResourceMessageReplyParams& params); |
| 62 | 65 |
| 66 // Called when the host has responded to our OpenPluginPrivateFileSystem |
| 67 // request. |
| 68 void OpenPluginPrivateFileSystemComplete( |
| 69 const base::Callback<void(int32_t)>& callback, |
| 70 const ResourceMessageReplyParams& params, |
| 71 const std::string& fsid); |
| 72 void InitPluginPrivateFileSystemComplete( |
| 73 const base::Callback<void(int32_t)>& callback, |
| 74 const ResourceMessageReplyParams& params); |
| 75 |
| 63 PP_FileSystemType type_; | 76 PP_FileSystemType type_; |
| 64 bool called_open_; | 77 bool called_open_; |
| 65 uint32_t callback_count_; | 78 uint32_t callback_count_; |
| 66 | 79 |
| 67 DISALLOW_COPY_AND_ASSIGN(FileSystemResource); | 80 DISALLOW_COPY_AND_ASSIGN(FileSystemResource); |
| 68 }; | 81 }; |
| 69 | 82 |
| 70 } // namespace proxy | 83 } // namespace proxy |
| 71 } // namespace ppapi | 84 } // namespace ppapi |
| 72 | 85 |
| 73 #endif // PPAPI_PROXY_FILE_SYSTEM_RESOURCE_H_ | 86 #endif // PPAPI_PROXY_FILE_SYSTEM_RESOURCE_H_ |
| OLD | NEW |