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 <map> | 8 #include <map> |
9 #include <queue> | 9 #include <queue> |
10 #include <string> | 10 #include <string> |
(...skipping 27 matching lines...) Expand all Loading... |
38 // resource. The |pending_renderer_id| and |pending_browser_id| must be | 38 // resource. The |pending_renderer_id| and |pending_browser_id| must be |
39 // already-opened file systems. | 39 // already-opened file systems. |
40 FileSystemResource(Connection connection, | 40 FileSystemResource(Connection connection, |
41 PP_Instance instance, | 41 PP_Instance instance, |
42 int pending_renderer_id, | 42 int pending_renderer_id, |
43 int pending_browser_id, | 43 int pending_browser_id, |
44 PP_FileSystemType type); | 44 PP_FileSystemType type); |
45 virtual ~FileSystemResource(); | 45 virtual ~FileSystemResource(); |
46 | 46 |
47 // Resource overrides. | 47 // Resource overrides. |
48 virtual thunk::PPB_FileSystem_API* AsPPB_FileSystem_API() OVERRIDE; | 48 virtual thunk::PPB_FileSystem_API* AsPPB_FileSystem_API() override; |
49 | 49 |
50 // PPB_FileSystem_API implementation. | 50 // PPB_FileSystem_API implementation. |
51 virtual int32_t Open(int64_t expected_size, | 51 virtual int32_t Open(int64_t expected_size, |
52 scoped_refptr<TrackedCallback> callback) OVERRIDE; | 52 scoped_refptr<TrackedCallback> callback) override; |
53 virtual PP_FileSystemType GetType() OVERRIDE; | 53 virtual PP_FileSystemType GetType() override; |
54 virtual void OpenQuotaFile(PP_Resource file_io) OVERRIDE; | 54 virtual void OpenQuotaFile(PP_Resource file_io) override; |
55 virtual void CloseQuotaFile(PP_Resource file_io) OVERRIDE; | 55 virtual void CloseQuotaFile(PP_Resource file_io) override; |
56 typedef base::Callback<void(int64_t)> RequestQuotaCallback; | 56 typedef base::Callback<void(int64_t)> RequestQuotaCallback; |
57 virtual int64_t RequestQuota(int64_t amount, | 57 virtual int64_t RequestQuota(int64_t amount, |
58 const RequestQuotaCallback& callback) OVERRIDE; | 58 const RequestQuotaCallback& callback) override; |
59 | 59 |
60 int32_t InitIsolatedFileSystem(const std::string& fsid, | 60 int32_t InitIsolatedFileSystem(const std::string& fsid, |
61 PP_IsolatedFileSystemType_Private type, | 61 PP_IsolatedFileSystemType_Private type, |
62 const base::Callback<void(int32_t)>& callback); | 62 const base::Callback<void(int32_t)>& callback); |
63 private: | 63 private: |
64 struct QuotaRequest { | 64 struct QuotaRequest { |
65 QuotaRequest(int64_t amount, | 65 QuotaRequest(int64_t amount, |
66 const RequestQuotaCallback& callback); | 66 const RequestQuotaCallback& callback); |
67 ~QuotaRequest(); | 67 ~QuotaRequest(); |
68 | 68 |
(...skipping 26 matching lines...) Expand all Loading... |
95 int64_t reserved_quota_; | 95 int64_t reserved_quota_; |
96 bool reserving_quota_; | 96 bool reserving_quota_; |
97 | 97 |
98 DISALLOW_COPY_AND_ASSIGN(FileSystemResource); | 98 DISALLOW_COPY_AND_ASSIGN(FileSystemResource); |
99 }; | 99 }; |
100 | 100 |
101 } // namespace proxy | 101 } // namespace proxy |
102 } // namespace ppapi | 102 } // namespace ppapi |
103 | 103 |
104 #endif // PPAPI_PROXY_FILE_SYSTEM_RESOURCE_H_ | 104 #endif // PPAPI_PROXY_FILE_SYSTEM_RESOURCE_H_ |
OLD | NEW |