| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 WEBKIT_PLUGINS_PPAPI_QUOTA_FILE_IO_H_ | 5 #ifndef WEBKIT_PLUGINS_PPAPI_QUOTA_FILE_IO_H_ |
| 6 #define WEBKIT_PLUGINS_PPAPI_QUOTA_FILE_IO_H_ | 6 #define WEBKIT_PLUGINS_PPAPI_QUOTA_FILE_IO_H_ |
| 7 | 7 |
| 8 #include <deque> | 8 #include <deque> |
| 9 | 9 |
| 10 #include "base/file_util_proxy.h" | 10 #include "base/file_util_proxy.h" |
| (...skipping 29 matching lines...) Expand all Loading... |
| 40 // |callback| will be dispatched when the operation completes. | 40 // |callback| will be dispatched when the operation completes. |
| 41 // Otherwise it returns false and |callback| will not be dispatched. | 41 // Otherwise it returns false and |callback| will not be dispatched. |
| 42 // |callback| will not be dispatched either when this instance is | 42 // |callback| will not be dispatched either when this instance is |
| 43 // destroyed before the operation completes. | 43 // destroyed before the operation completes. |
| 44 // SetLength/WillSetLength cannot be called while there're any in-flight | 44 // SetLength/WillSetLength cannot be called while there're any in-flight |
| 45 // operations. For Write/WillWrite it is guaranteed that |callback| are | 45 // operations. For Write/WillWrite it is guaranteed that |callback| are |
| 46 // always dispatched in the same order as Write being called. | 46 // always dispatched in the same order as Write being called. |
| 47 bool Write(int64_t offset, | 47 bool Write(int64_t offset, |
| 48 const char* buffer, | 48 const char* buffer, |
| 49 int32_t bytes_to_write, | 49 int32_t bytes_to_write, |
| 50 WriteCallback* callback); | 50 const WriteCallback& callback); |
| 51 bool WillWrite(int64_t offset, | 51 bool WillWrite(int64_t offset, |
| 52 int32_t bytes_to_write, | 52 int32_t bytes_to_write, |
| 53 WriteCallback* callback); | 53 const WriteCallback& callback); |
| 54 | 54 |
| 55 bool SetLength(int64_t length, StatusCallback* callback); | 55 bool SetLength(int64_t length, StatusCallback* callback); |
| 56 bool WillSetLength(int64_t length, StatusCallback* callback); | 56 bool WillSetLength(int64_t length, StatusCallback* callback); |
| 57 | 57 |
| 58 // Returns the plugin delegate or NULL if the resource has outlived the | 58 // Returns the plugin delegate or NULL if the resource has outlived the |
| 59 // instance. | 59 // instance. |
| 60 PluginDelegate* GetPluginDelegate() const; | 60 PluginDelegate* GetPluginDelegate() const; |
| 61 | 61 |
| 62 private: | 62 private: |
| 63 class PendingOperationBase; | 63 class PendingOperationBase; |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 105 | 105 |
| 106 base::WeakPtrFactory<QuotaFileIO> weak_factory_; | 106 base::WeakPtrFactory<QuotaFileIO> weak_factory_; |
| 107 | 107 |
| 108 DISALLOW_COPY_AND_ASSIGN(QuotaFileIO); | 108 DISALLOW_COPY_AND_ASSIGN(QuotaFileIO); |
| 109 }; | 109 }; |
| 110 | 110 |
| 111 } // namespace ppapi | 111 } // namespace ppapi |
| 112 } // namespace webkit | 112 } // namespace webkit |
| 113 | 113 |
| 114 #endif // WEBKIT_PLUGINS_PPAPI_QUOTA_FILE_IO_H_ | 114 #endif // WEBKIT_PLUGINS_PPAPI_QUOTA_FILE_IO_H_ |
| OLD | NEW |