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