Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(293)

Side by Side Diff: WebCore/platform/AsyncFileSystemCallbacks.h

Issue 12183004: Patch 3 in the series. (Closed) Base URL: http://svn.webkit.org/repository/webkit/trunk/Source/
Patch Set: Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 17 matching lines...) Expand all
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 */ 29 */
30 30
31 #ifndef AsyncFileSystemCallbacks_h 31 #ifndef AsyncFileSystemCallbacks_h
32 #define AsyncFileSystemCallbacks_h 32 #define AsyncFileSystemCallbacks_h
33 33
34 #if ENABLE(FILE_SYSTEM) 34 #if ENABLE(FILE_SYSTEM)
35 35
36 #include "AsyncFileSystem.h" 36 #include "AsyncFileSystem.h"
37 #include "AsyncFileWriter.h" 37 #include "AsyncFileWriter.h"
38 #include "BlobData.h"
38 #include "FileMetadata.h" 39 #include "FileMetadata.h"
39 #include <wtf/text/WTFString.h> 40 #include <wtf/text/WTFString.h>
40 41
41 namespace WebCore { 42 namespace WebCore {
42 43
43 class AsyncFileSystemCallbacks { 44 class AsyncFileSystemCallbacks {
44 WTF_MAKE_NONCOPYABLE(AsyncFileSystemCallbacks); 45 WTF_MAKE_NONCOPYABLE(AsyncFileSystemCallbacks);
45 public: 46 public:
46 AsyncFileSystemCallbacks() { } 47 AsyncFileSystemCallbacks() { }
47 48
48 // Called when a requested operation is completed successfully. 49 // Called when a requested operation is completed successfully.
49 virtual void didSucceed() { ASSERT_NOT_REACHED(); } 50 virtual void didSucceed() { ASSERT_NOT_REACHED(); }
50 51
51 // Called when a requested file system is opened. 52 // Called when a requested file system is opened.
52 virtual void didOpenFileSystem(const String& name, const KURL& rootURL, Pass OwnPtr<AsyncFileSystem>) { ASSERT_NOT_REACHED(); } 53 virtual void didOpenFileSystem(const String& name, const KURL& rootURL, Pass OwnPtr<AsyncFileSystem>) { ASSERT_NOT_REACHED(); }
53 54
54 // Called when a file metadata is read successfully. 55 // Called when a file metadata is read successfully.
55 virtual void didReadMetadata(const FileMetadata&) { ASSERT_NOT_REACHED(); } 56 virtual void didReadMetadata(const FileMetadata&) { ASSERT_NOT_REACHED(); }
56 57
58 // Called when a snapshot file is created successfully.
59 virtual void didCreateSnapshotFile(const FileMetadata&, PassRefPtr<BlobDataH andle> snapshot) { ASSERT_NOT_REACHED(); }
60
57 // Called when a directory entry is read. 61 // Called when a directory entry is read.
58 virtual void didReadDirectoryEntry(const String& name, bool isDirectory) { A SSERT_NOT_REACHED(); } 62 virtual void didReadDirectoryEntry(const String& name, bool isDirectory) { A SSERT_NOT_REACHED(); }
59 63
60 // Called after a chunk of directory entries have been read (i.e. indicates it's good time to call back to the application). If hasMore is true there can be more chunks. 64 // Called after a chunk of directory entries have been read (i.e. indicates it's good time to call back to the application). If hasMore is true there can be more chunks.
61 virtual void didReadDirectoryEntries(bool hasMore) { ASSERT_NOT_REACHED(); } 65 virtual void didReadDirectoryEntries(bool hasMore) { ASSERT_NOT_REACHED(); }
62 66
63 // Called when an AsyncFileWrter has been created successfully. 67 // Called when an AsyncFileWrter has been created successfully.
64 virtual void didCreateFileWriter(PassOwnPtr<AsyncFileWriter>, long long leng th) { ASSERT_NOT_REACHED(); } 68 virtual void didCreateFileWriter(PassOwnPtr<AsyncFileWriter>, long long leng th) { ASSERT_NOT_REACHED(); }
65 69
66 // Called when there was an error. 70 // Called when there was an error.
67 virtual void didFail(int code) = 0; 71 virtual void didFail(int code) = 0;
68 72
69 virtual ~AsyncFileSystemCallbacks() { } 73 virtual ~AsyncFileSystemCallbacks() { }
70 }; 74 };
71 75
72 } // namespace 76 } // namespace
73 77
74 #endif // ENABLE(FILE_SYSTEM) 78 #endif // ENABLE(FILE_SYSTEM)
75 79
76 #endif // AsyncFileSystemCallbacks_h 80 #endif // AsyncFileSystemCallbacks_h
OLDNEW
« no previous file with comments | « WebCore/Modules/filesystem/DOMFileSystemSync.cpp ('k') | WebCore/platform/gtk/AsyncFileSystemGtk.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698