summaryrefslogtreecommitdiffstats
path: root/ppapi/thunk/ppb_file_system_api.h
blob: 0351bde4c1231d2ba103c060b0a2c1a5e709db00 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef PPAPI_THUNK_PPB_FILE_SYSTEM_API_H_
#define PPAPI_THUNK_PPB_FILE_SYSTEM_API_H_

#include "base/callback_forward.h"
#include "base/memory/ref_counted.h"
#include "ppapi/c/ppb_file_system.h"

namespace ppapi {

class TrackedCallback;

namespace thunk {

class PPB_FileSystem_API {
 public:
  virtual ~PPB_FileSystem_API() {}

  virtual int32_t Open(int64_t expected_size,
                       scoped_refptr<TrackedCallback> callback) = 0;
  virtual PP_FileSystemType GetType() = 0;
  virtual void OpenQuotaFile(PP_Resource file_io) = 0;
  virtual void CloseQuotaFile(PP_Resource file_io) = 0;
  typedef base::Callback<void(int64_t)> RequestQuotaCallback;
  virtual int64_t RequestQuota(int64_t amount,
                               const RequestQuotaCallback& callback) = 0;
};

}  // namespace thunk
}  // namespace ppapi

#endif  // PPAPI_THUNK_PPB_FILE_SYSTEM_API_H_