| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_THUNK_PPB_FILE_SYSTEM_API_H_ | 5 #ifndef PPAPI_THUNK_PPB_FILE_SYSTEM_API_H_ |
| 6 #define PPAPI_THUNK_PPB_FILE_SYSTEM_API_H_ | 6 #define PPAPI_THUNK_PPB_FILE_SYSTEM_API_H_ |
| 7 | 7 |
| 8 #include <stdint.h> |
| 9 |
| 8 #include "base/callback_forward.h" | 10 #include "base/callback_forward.h" |
| 9 #include "base/memory/ref_counted.h" | 11 #include "base/memory/ref_counted.h" |
| 10 #include "ppapi/c/ppb_file_system.h" | 12 #include "ppapi/c/ppb_file_system.h" |
| 11 | 13 |
| 12 namespace ppapi { | 14 namespace ppapi { |
| 13 | 15 |
| 14 class TrackedCallback; | 16 class TrackedCallback; |
| 15 | 17 |
| 16 namespace thunk { | 18 namespace thunk { |
| 17 | 19 |
| 18 class PPB_FileSystem_API { | 20 class PPB_FileSystem_API { |
| 19 public: | 21 public: |
| 20 virtual ~PPB_FileSystem_API() {} | 22 virtual ~PPB_FileSystem_API() {} |
| 21 | 23 |
| 22 virtual int32_t Open(int64_t expected_size, | 24 virtual int32_t Open(int64_t expected_size, |
| 23 scoped_refptr<TrackedCallback> callback) = 0; | 25 scoped_refptr<TrackedCallback> callback) = 0; |
| 24 virtual PP_FileSystemType GetType() = 0; | 26 virtual PP_FileSystemType GetType() = 0; |
| 25 virtual void OpenQuotaFile(PP_Resource file_io) = 0; | 27 virtual void OpenQuotaFile(PP_Resource file_io) = 0; |
| 26 virtual void CloseQuotaFile(PP_Resource file_io) = 0; | 28 virtual void CloseQuotaFile(PP_Resource file_io) = 0; |
| 27 typedef base::Callback<void(int64_t)> RequestQuotaCallback; | 29 typedef base::Callback<void(int64_t)> RequestQuotaCallback; |
| 28 virtual int64_t RequestQuota(int64_t amount, | 30 virtual int64_t RequestQuota(int64_t amount, |
| 29 const RequestQuotaCallback& callback) = 0; | 31 const RequestQuotaCallback& callback) = 0; |
| 30 }; | 32 }; |
| 31 | 33 |
| 32 } // namespace thunk | 34 } // namespace thunk |
| 33 } // namespace ppapi | 35 } // namespace ppapi |
| 34 | 36 |
| 35 #endif // PPAPI_THUNK_PPB_FILE_SYSTEM_API_H_ | 37 #endif // PPAPI_THUNK_PPB_FILE_SYSTEM_API_H_ |
| OLD | NEW |