| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2010 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 137 virtual void didReadMetadata(const FileMetadata&) OVERRIDE; | 137 virtual void didReadMetadata(const FileMetadata&) OVERRIDE; |
| 138 | 138 |
| 139 private: | 139 private: |
| 140 MetadataCallbacks(PassOwnPtr<MetadataCallback>, PassOwnPtr<ErrorCallback>, E
xecutionContext*, DOMFileSystemBase*); | 140 MetadataCallbacks(PassOwnPtr<MetadataCallback>, PassOwnPtr<ErrorCallback>, E
xecutionContext*, DOMFileSystemBase*); |
| 141 OwnPtr<MetadataCallback> m_successCallback; | 141 OwnPtr<MetadataCallback> m_successCallback; |
| 142 }; | 142 }; |
| 143 | 143 |
| 144 class FileWriterBaseCallbacks FINAL : public FileSystemCallbacksBase { | 144 class FileWriterBaseCallbacks FINAL : public FileSystemCallbacksBase { |
| 145 public: | 145 public: |
| 146 static PassOwnPtr<AsyncFileSystemCallbacks> create(PassRefPtrWillBeRawPtr<Fi
leWriterBase>, PassOwnPtr<FileWriterBaseCallback>, PassOwnPtr<ErrorCallback>, Ex
ecutionContext*); | 146 static PassOwnPtr<AsyncFileSystemCallbacks> create(PassRefPtrWillBeRawPtr<Fi
leWriterBase>, PassOwnPtr<FileWriterBaseCallback>, PassOwnPtr<ErrorCallback>, Ex
ecutionContext*); |
| 147 virtual void didCreateFileWriter(PassOwnPtr<blink::WebFileWriter>, long long
length) OVERRIDE; | 147 virtual void didCreateFileWriter(PassOwnPtr<WebFileWriter>, long long length
) OVERRIDE; |
| 148 | 148 |
| 149 private: | 149 private: |
| 150 FileWriterBaseCallbacks(PassRefPtrWillBeRawPtr<FileWriterBase>, PassOwnPtr<F
ileWriterBaseCallback>, PassOwnPtr<ErrorCallback>, ExecutionContext*); | 150 FileWriterBaseCallbacks(PassRefPtrWillBeRawPtr<FileWriterBase>, PassOwnPtr<F
ileWriterBaseCallback>, PassOwnPtr<ErrorCallback>, ExecutionContext*); |
| 151 Persistent<FileWriterBase> m_fileWriter; | 151 Persistent<FileWriterBase> m_fileWriter; |
| 152 OwnPtr<FileWriterBaseCallback> m_successCallback; | 152 OwnPtr<FileWriterBaseCallback> m_successCallback; |
| 153 }; | 153 }; |
| 154 | 154 |
| 155 class SnapshotFileCallback FINAL : public FileSystemCallbacksBase { | 155 class SnapshotFileCallback FINAL : public FileSystemCallbacksBase { |
| 156 public: | 156 public: |
| 157 static PassOwnPtr<AsyncFileSystemCallbacks> create(DOMFileSystemBase*, const
String& name, const KURL&, PassOwnPtr<FileCallback>, PassOwnPtr<ErrorCallback>,
ExecutionContext*); | 157 static PassOwnPtr<AsyncFileSystemCallbacks> create(DOMFileSystemBase*, const
String& name, const KURL&, PassOwnPtr<FileCallback>, PassOwnPtr<ErrorCallback>,
ExecutionContext*); |
| 158 virtual void didCreateSnapshotFile(const FileMetadata&, PassRefPtr<BlobDataH
andle> snapshot); | 158 virtual void didCreateSnapshotFile(const FileMetadata&, PassRefPtr<BlobDataH
andle> snapshot); |
| 159 | 159 |
| 160 private: | 160 private: |
| 161 SnapshotFileCallback(DOMFileSystemBase*, const String& name, const KURL&, Pa
ssOwnPtr<FileCallback>, PassOwnPtr<ErrorCallback>, ExecutionContext*); | 161 SnapshotFileCallback(DOMFileSystemBase*, const String& name, const KURL&, Pa
ssOwnPtr<FileCallback>, PassOwnPtr<ErrorCallback>, ExecutionContext*); |
| 162 String m_name; | 162 String m_name; |
| 163 KURL m_url; | 163 KURL m_url; |
| 164 OwnPtr<FileCallback> m_successCallback; | 164 OwnPtr<FileCallback> m_successCallback; |
| 165 }; | 165 }; |
| 166 | 166 |
| 167 class VoidCallbacks FINAL : public FileSystemCallbacksBase { | 167 class VoidCallbacks FINAL : public FileSystemCallbacksBase { |
| 168 public: | 168 public: |
| 169 static PassOwnPtr<AsyncFileSystemCallbacks> create(PassOwnPtr<VoidCallback>,
PassOwnPtr<ErrorCallback>, ExecutionContext*, DOMFileSystemBase*); | 169 static PassOwnPtr<AsyncFileSystemCallbacks> create(PassOwnPtr<VoidCallback>,
PassOwnPtr<ErrorCallback>, ExecutionContext*, DOMFileSystemBase*); |
| 170 virtual void didSucceed() OVERRIDE; | 170 virtual void didSucceed() OVERRIDE; |
| 171 | 171 |
| 172 private: | 172 private: |
| 173 VoidCallbacks(PassOwnPtr<VoidCallback>, PassOwnPtr<ErrorCallback>, Execution
Context*, DOMFileSystemBase*); | 173 VoidCallbacks(PassOwnPtr<VoidCallback>, PassOwnPtr<ErrorCallback>, Execution
Context*, DOMFileSystemBase*); |
| 174 OwnPtr<VoidCallback> m_successCallback; | 174 OwnPtr<VoidCallback> m_successCallback; |
| 175 }; | 175 }; |
| 176 | 176 |
| 177 } // namespace | 177 } // namespace blink |
| 178 | 178 |
| 179 #endif // FileSystemCallbacks_h | 179 #endif // FileSystemCallbacks_h |
| OLD | NEW |