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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 // Called when a snapshot file is created successfully. | 61 // Called when a snapshot file is created successfully. |
62 virtual void didCreateSnapshotFile(const FileMetadata&, PassRefPtr<BlobDataH
andle> snapshot) { ASSERT_NOT_REACHED(); } | 62 virtual void didCreateSnapshotFile(const FileMetadata&, PassRefPtr<BlobDataH
andle> snapshot) { ASSERT_NOT_REACHED(); } |
63 | 63 |
64 // Called when a directory entry is read. | 64 // Called when a directory entry is read. |
65 virtual void didReadDirectoryEntry(const String& name, bool isDirectory) { A
SSERT_NOT_REACHED(); } | 65 virtual void didReadDirectoryEntry(const String& name, bool isDirectory) { A
SSERT_NOT_REACHED(); } |
66 | 66 |
67 // 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. | 67 // 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. |
68 virtual void didReadDirectoryEntries(bool hasMore) { ASSERT_NOT_REACHED(); } | 68 virtual void didReadDirectoryEntries(bool hasMore) { ASSERT_NOT_REACHED(); } |
69 | 69 |
70 // Called when an AsyncFileWrter has been created successfully. | 70 // Called when an AsyncFileWrter has been created successfully. |
71 virtual void didCreateFileWriter(PassOwnPtr<blink::WebFileWriter>, long long
length) { ASSERT_NOT_REACHED(); } | 71 virtual void didCreateFileWriter(PassOwnPtr<WebFileWriter>, long long length
) { ASSERT_NOT_REACHED(); } |
72 | 72 |
73 // Called when there was an error. | 73 // Called when there was an error. |
74 virtual void didFail(int code) = 0; | 74 virtual void didFail(int code) = 0; |
75 | 75 |
76 // Returns true if the caller expects that the calling thread blocks | 76 // Returns true if the caller expects that the calling thread blocks |
77 // until completion. | 77 // until completion. |
78 virtual bool shouldBlockUntilCompletion() const | 78 virtual bool shouldBlockUntilCompletion() const |
79 { | 79 { |
80 return m_blockUntilCompletion; | 80 return m_blockUntilCompletion; |
81 } | 81 } |
82 | 82 |
83 void setShouldBlockUntilCompletion(bool flag) | 83 void setShouldBlockUntilCompletion(bool flag) |
84 { | 84 { |
85 m_blockUntilCompletion = flag; | 85 m_blockUntilCompletion = flag; |
86 } | 86 } |
87 | 87 |
88 virtual ~AsyncFileSystemCallbacks() { } | 88 virtual ~AsyncFileSystemCallbacks() { } |
89 | 89 |
90 private: | 90 private: |
91 bool m_blockUntilCompletion; | 91 bool m_blockUntilCompletion; |
92 }; | 92 }; |
93 | 93 |
94 } // namespace | 94 } // namespace blink |
95 | 95 |
96 #endif // AsyncFileSystemCallbacks_h | 96 #endif // AsyncFileSystemCallbacks_h |
OLD | NEW |