| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 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 CONTENT_BROWSER_RENDERER_HOST_PEPPER_PEPPER_FILE_SYSTEM_BROWSER_HOST_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_PEPPER_PEPPER_FILE_SYSTEM_BROWSER_HOST_H_ |
| 6 #define CONTENT_BROWSER_RENDERER_HOST_PEPPER_PEPPER_FILE_SYSTEM_BROWSER_HOST_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_PEPPER_PEPPER_FILE_SYSTEM_BROWSER_HOST_H_ |
| 7 | 7 |
| 8 #include <queue> | 8 #include <queue> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 GURL GetRootUrl() const { return root_url_; } | 57 GURL GetRootUrl() const { return root_url_; } |
| 58 scoped_refptr<storage::FileSystemContext> GetFileSystemContext() const { | 58 scoped_refptr<storage::FileSystemContext> GetFileSystemContext() const { |
| 59 return file_system_context_; | 59 return file_system_context_; |
| 60 } | 60 } |
| 61 | 61 |
| 62 // Supports FileIOs direct access on the host side. | 62 // Supports FileIOs direct access on the host side. |
| 63 // Non-NULL only for PP_FILESYSTEMTYPE_LOCAL{PERSISTENT,TEMPORARY}. | 63 // Non-NULL only for PP_FILESYSTEMTYPE_LOCAL{PERSISTENT,TEMPORARY}. |
| 64 storage::FileSystemOperationRunner* GetFileSystemOperationRunner() const { | 64 storage::FileSystemOperationRunner* GetFileSystemOperationRunner() const { |
| 65 return file_system_operation_runner_.get(); | 65 return file_system_operation_runner_.get(); |
| 66 } | 66 } |
| 67 bool ChecksQuota() const { return quota_reservation_ != NULL; } | 67 bool ChecksQuota() const { return quota_reservation_.get() != NULL; } |
| 68 // Opens a file for writing with quota checks. Returns the file size in the | 68 // Opens a file for writing with quota checks. Returns the file size in the |
| 69 // callback. | 69 // callback. |
| 70 typedef base::Callback<void(int64_t)> OpenQuotaFileCallback; | 70 typedef base::Callback<void(int64_t)> OpenQuotaFileCallback; |
| 71 void OpenQuotaFile(PepperFileIOHost* file_io_host, | 71 void OpenQuotaFile(PepperFileIOHost* file_io_host, |
| 72 const storage::FileSystemURL& url, | 72 const storage::FileSystemURL& url, |
| 73 const OpenQuotaFileCallback& callback); | 73 const OpenQuotaFileCallback& callback); |
| 74 // Closes the file. This must be called after OpenQuotaFile and before the | 74 // Closes the file. This must be called after OpenQuotaFile and before the |
| 75 // PepperFileIOHost is destroyed. | 75 // PepperFileIOHost is destroyed. |
| 76 void CloseQuotaFile(PepperFileIOHost* file_io_host, | 76 void CloseQuotaFile(PepperFileIOHost* file_io_host, |
| 77 const ppapi::FileGrowth& file_growth); | 77 const ppapi::FileGrowth& file_growth); |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 165 std::string fsid_; // used only for isolated filesystems. | 165 std::string fsid_; // used only for isolated filesystems. |
| 166 | 166 |
| 167 base::WeakPtrFactory<PepperFileSystemBrowserHost> weak_factory_; | 167 base::WeakPtrFactory<PepperFileSystemBrowserHost> weak_factory_; |
| 168 | 168 |
| 169 DISALLOW_COPY_AND_ASSIGN(PepperFileSystemBrowserHost); | 169 DISALLOW_COPY_AND_ASSIGN(PepperFileSystemBrowserHost); |
| 170 }; | 170 }; |
| 171 | 171 |
| 172 } // namespace content | 172 } // namespace content |
| 173 | 173 |
| 174 #endif // CONTENT_BROWSER_RENDERER_HOST_PEPPER_PEPPER_FILE_SYSTEM_BROWSER_HOST_
H_ | 174 #endif // CONTENT_BROWSER_RENDERER_HOST_PEPPER_PEPPER_FILE_SYSTEM_BROWSER_HOST_
H_ |
| OLD | NEW |