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 16 matching lines...) Expand all Loading... |
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
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 WebFileWriterClient_h | 31 #ifndef WebFileWriterClient_h |
32 #define WebFileWriterClient_h | 32 #define WebFileWriterClient_h |
33 | 33 |
34 #include "WebCommon.h" | 34 #include "WebCommon.h" |
35 #include "WebFileError.h" | 35 #include "WebFileError.h" |
36 | 36 |
37 namespace WebKit { | 37 namespace blink { |
38 | 38 |
39 class WebFileWriterClient { | 39 class WebFileWriterClient { |
40 public: | 40 public: |
41 // Called for each chunk of a write, to indicate progress. | 41 // Called for each chunk of a write, to indicate progress. |
42 // On the final chunk, when the write is finished, complete will be true. | 42 // On the final chunk, when the write is finished, complete will be true. |
43 virtual void didWrite(long long bytes, bool complete) = 0; | 43 virtual void didWrite(long long bytes, bool complete) = 0; |
44 | 44 |
45 // Called once when the truncate completes successfully. | 45 // Called once when the truncate completes successfully. |
46 virtual void didTruncate() = 0; | 46 virtual void didTruncate() = 0; |
47 | 47 |
48 // Called if the write or truncate fails, or if it is cancelled before the w
rite or truncate completes. Completion of an operation will be signalled exactly
once, either by didFail, didTruncate, or didWrite(..., true). | 48 // Called if the write or truncate fails, or if it is cancelled before the w
rite or truncate completes. Completion of an operation will be signalled exactly
once, either by didFail, didTruncate, or didWrite(..., true). |
49 virtual void didFail(WebFileError) = 0; | 49 virtual void didFail(WebFileError) = 0; |
50 | 50 |
51 protected: | 51 protected: |
52 virtual ~WebFileWriterClient() { } | 52 virtual ~WebFileWriterClient() { } |
53 }; | 53 }; |
54 | 54 |
55 } // namespace WebKit | 55 } // namespace blink |
56 | 56 |
57 #endif | 57 #endif |
OLD | NEW |