| 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 26 matching lines...) Expand all Loading... |
| 37 #include "wtf/Vector.h" | 37 #include "wtf/Vector.h" |
| 38 #include "wtf/text/WTFString.h" | 38 #include "wtf/text/WTFString.h" |
| 39 | 39 |
| 40 namespace WebCore { | 40 namespace WebCore { |
| 41 | 41 |
| 42 class DOMFileSystemBase; | 42 class DOMFileSystemBase; |
| 43 class DirectoryReaderBase; | 43 class DirectoryReaderBase; |
| 44 class EntriesCallback; | 44 class EntriesCallback; |
| 45 class EntryCallback; | 45 class EntryCallback; |
| 46 class ErrorCallback; | 46 class ErrorCallback; |
| 47 class FileCallback; |
| 47 struct FileMetadata; | 48 struct FileMetadata; |
| 48 class FileSystemCallback; | 49 class FileSystemCallback; |
| 49 class FileWriterBase; | 50 class FileWriterBase; |
| 50 class FileWriterBaseCallback; | 51 class FileWriterBaseCallback; |
| 51 class MetadataCallback; | 52 class MetadataCallback; |
| 52 class ExecutionContext; | 53 class ExecutionContext; |
| 53 class VoidCallback; | 54 class VoidCallback; |
| 54 | 55 |
| 55 class FileSystemCallbacksBase : public AsyncFileSystemCallbacks { | 56 class FileSystemCallbacksBase : public AsyncFileSystemCallbacks { |
| 56 public: | 57 public: |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 143 public: | 144 public: |
| 144 static PassOwnPtr<AsyncFileSystemCallbacks> create(PassRefPtrWillBeRawPtr<Fi
leWriterBase>, PassOwnPtr<FileWriterBaseCallback>, PassOwnPtr<ErrorCallback>, Ex
ecutionContext*); | 145 static PassOwnPtr<AsyncFileSystemCallbacks> create(PassRefPtrWillBeRawPtr<Fi
leWriterBase>, PassOwnPtr<FileWriterBaseCallback>, PassOwnPtr<ErrorCallback>, Ex
ecutionContext*); |
| 145 virtual void didCreateFileWriter(PassOwnPtr<blink::WebFileWriter>, long long
length) OVERRIDE; | 146 virtual void didCreateFileWriter(PassOwnPtr<blink::WebFileWriter>, long long
length) OVERRIDE; |
| 146 | 147 |
| 147 private: | 148 private: |
| 148 FileWriterBaseCallbacks(PassRefPtrWillBeRawPtr<FileWriterBase>, PassOwnPtr<F
ileWriterBaseCallback>, PassOwnPtr<ErrorCallback>, ExecutionContext*); | 149 FileWriterBaseCallbacks(PassRefPtrWillBeRawPtr<FileWriterBase>, PassOwnPtr<F
ileWriterBaseCallback>, PassOwnPtr<ErrorCallback>, ExecutionContext*); |
| 149 Persistent<FileWriterBase> m_fileWriter; | 150 Persistent<FileWriterBase> m_fileWriter; |
| 150 OwnPtr<FileWriterBaseCallback> m_successCallback; | 151 OwnPtr<FileWriterBaseCallback> m_successCallback; |
| 151 }; | 152 }; |
| 152 | 153 |
| 154 class SnapshotFileCallback FINAL : public FileSystemCallbacksBase { |
| 155 public: |
| 156 static PassOwnPtr<AsyncFileSystemCallbacks> create(DOMFileSystemBase*, const
String& name, const KURL&, PassOwnPtr<FileCallback>, PassOwnPtr<ErrorCallback>,
ExecutionContext*); |
| 157 virtual void didCreateSnapshotFile(const FileMetadata&, PassRefPtr<BlobDataH
andle> snapshot); |
| 158 |
| 159 private: |
| 160 SnapshotFileCallback(DOMFileSystemBase*, const String& name, const KURL&, Pa
ssOwnPtr<FileCallback>, PassOwnPtr<ErrorCallback>, ExecutionContext*); |
| 161 String m_name; |
| 162 KURL m_url; |
| 163 OwnPtr<FileCallback> m_successCallback; |
| 164 }; |
| 165 |
| 153 class VoidCallbacks FINAL : public FileSystemCallbacksBase { | 166 class VoidCallbacks FINAL : public FileSystemCallbacksBase { |
| 154 public: | 167 public: |
| 155 static PassOwnPtr<AsyncFileSystemCallbacks> create(PassOwnPtr<VoidCallback>,
PassOwnPtr<ErrorCallback>, ExecutionContext*, DOMFileSystemBase*); | 168 static PassOwnPtr<AsyncFileSystemCallbacks> create(PassOwnPtr<VoidCallback>,
PassOwnPtr<ErrorCallback>, ExecutionContext*, DOMFileSystemBase*); |
| 156 virtual void didSucceed() OVERRIDE; | 169 virtual void didSucceed() OVERRIDE; |
| 157 | 170 |
| 158 private: | 171 private: |
| 159 VoidCallbacks(PassOwnPtr<VoidCallback>, PassOwnPtr<ErrorCallback>, Execution
Context*, DOMFileSystemBase*); | 172 VoidCallbacks(PassOwnPtr<VoidCallback>, PassOwnPtr<ErrorCallback>, Execution
Context*, DOMFileSystemBase*); |
| 160 OwnPtr<VoidCallback> m_successCallback; | 173 OwnPtr<VoidCallback> m_successCallback; |
| 161 }; | 174 }; |
| 162 | 175 |
| 163 } // namespace | 176 } // namespace |
| 164 | 177 |
| 165 #endif // FileSystemCallbacks_h | 178 #endif // FileSystemCallbacks_h |
| OLD | NEW |