| 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 | 63 |
| 63 // FileWriterBase | 64 // FileWriterBase |
| 64 void write(Blob*, ExceptionState&); | 65 void write(Blob*, ExceptionState&); |
| 65 void seek(long long position, ExceptionState&); | 66 void seek(long long position, ExceptionState&); |
| 66 void truncate(long long length, ExceptionState&); | 67 void truncate(long long length, ExceptionState&); |
| 67 | 68 |
| 68 // WebFileWriterClient, via FileWriterBase | 69 // WebFileWriterClient, via FileWriterBase |
| 69 virtual void didWrite(long long bytes, bool complete) override; | 70 virtual void didWrite(long long bytes, bool complete) override; |
| 70 virtual void didTruncate() override; | 71 virtual void didTruncate() override; |
| 71 virtual void didFail(WebFileError) override; | 72 virtual void didFail(WebFileError) override; |
| 72 | 73 |
| 73 private: | 74 private: |
| 74 FileWriterSync(); | 75 FileWriterSync(); |
| 75 void prepareForWrite(); | 76 void prepareForWrite(); |
| 76 | 77 |
| 77 FileError::ErrorCode m_error; | 78 FileError::ErrorCode m_error; |
| 78 #if ENABLE(ASSERT) | 79 #if ENABLE(ASSERT) |
| 79 bool m_complete; | 80 bool m_complete; |
| 80 #endif | 81 #endif |
| 81 }; | 82 }; |
| 82 | 83 |
| 83 } // namespace blink | 84 } // namespace blink |
| 84 | 85 |
| 85 #endif // FileWriter_h | 86 #endif // FileWriterSync_h |
| OLD | NEW |