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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 , public ScriptWrappable | 52 , public ScriptWrappable |
53 , public WebFileWriterClient { | 53 , public WebFileWriterClient { |
54 DEFINE_WRAPPERTYPEINFO(); | 54 DEFINE_WRAPPERTYPEINFO(); |
55 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(FileWriterSync); | 55 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(FileWriterSync); |
56 public: | 56 public: |
57 static FileWriterSync* create() | 57 static FileWriterSync* create() |
58 { | 58 { |
59 return new FileWriterSync(); | 59 return new FileWriterSync(); |
60 } | 60 } |
61 virtual ~FileWriterSync(); | 61 virtual ~FileWriterSync(); |
62 virtual void trace(Visitor*) override; | 62 DECLARE_VIRTUAL_TRACE(); |
63 | 63 |
64 // FileWriterBase | 64 // FileWriterBase |
65 void write(Blob*, ExceptionState&); | 65 void write(Blob*, ExceptionState&); |
66 void seek(long long position, ExceptionState&); | 66 void seek(long long position, ExceptionState&); |
67 void truncate(long long length, ExceptionState&); | 67 void truncate(long long length, ExceptionState&); |
68 | 68 |
69 // WebFileWriterClient, via FileWriterBase | 69 // WebFileWriterClient, via FileWriterBase |
70 virtual void didWrite(long long bytes, bool complete) override; | 70 virtual void didWrite(long long bytes, bool complete) override; |
71 virtual void didTruncate() override; | 71 virtual void didTruncate() override; |
72 virtual void didFail(WebFileError) override; | 72 virtual void didFail(WebFileError) override; |
73 | 73 |
74 private: | 74 private: |
75 FileWriterSync(); | 75 FileWriterSync(); |
76 void prepareForWrite(); | 76 void prepareForWrite(); |
77 | 77 |
78 FileError::ErrorCode m_error; | 78 FileError::ErrorCode m_error; |
79 #if ENABLE(ASSERT) | 79 #if ENABLE(ASSERT) |
80 bool m_complete; | 80 bool m_complete; |
81 #endif | 81 #endif |
82 }; | 82 }; |
83 | 83 |
84 } // namespace blink | 84 } // namespace blink |
85 | 85 |
86 #endif // FileWriterSync_h | 86 #endif // FileWriterSync_h |
OLD | NEW |