| 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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 static const double progressNotificationIntervalMS = 50; | 44 static const double progressNotificationIntervalMS = 50; |
| 45 | 45 |
| 46 FileWriter* FileWriter::create(ExecutionContext* context) { | 46 FileWriter* FileWriter::create(ExecutionContext* context) { |
| 47 FileWriter* fileWriter = new FileWriter(context); | 47 FileWriter* fileWriter = new FileWriter(context); |
| 48 fileWriter->suspendIfNeeded(); | 48 fileWriter->suspendIfNeeded(); |
| 49 return fileWriter; | 49 return fileWriter; |
| 50 } | 50 } |
| 51 | 51 |
| 52 FileWriter::FileWriter(ExecutionContext* context) | 52 FileWriter::FileWriter(ExecutionContext* context) |
| 53 : ActiveScriptWrappable(this), | 53 : ActiveScriptWrappable(this), |
| 54 ActiveDOMObject(context), | 54 SuspendableObject(context), |
| 55 m_readyState(kInit), | 55 m_readyState(kInit), |
| 56 m_operationInProgress(OperationNone), | 56 m_operationInProgress(OperationNone), |
| 57 m_queuedOperation(OperationNone), | 57 m_queuedOperation(OperationNone), |
| 58 m_bytesWritten(0), | 58 m_bytesWritten(0), |
| 59 m_bytesToWrite(0), | 59 m_bytesToWrite(0), |
| 60 m_truncateLength(-1), | 60 m_truncateLength(-1), |
| 61 m_numAborts(0), | 61 m_numAborts(0), |
| 62 m_recursionDepth(0), | 62 m_recursionDepth(0), |
| 63 m_lastProgressNotificationTimeMS(0) {} | 63 m_lastProgressNotificationTimeMS(0) {} |
| 64 | 64 |
| (...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 305 ASSERT(errorCode); | 305 ASSERT(errorCode); |
| 306 FileError::throwDOMException(exceptionState, errorCode); | 306 FileError::throwDOMException(exceptionState, errorCode); |
| 307 m_error = FileError::createDOMException(errorCode); | 307 m_error = FileError::createDOMException(errorCode); |
| 308 } | 308 } |
| 309 | 309 |
| 310 DEFINE_TRACE(FileWriter) { | 310 DEFINE_TRACE(FileWriter) { |
| 311 visitor->trace(m_error); | 311 visitor->trace(m_error); |
| 312 visitor->trace(m_blobBeingWritten); | 312 visitor->trace(m_blobBeingWritten); |
| 313 EventTargetWithInlineData::trace(visitor); | 313 EventTargetWithInlineData::trace(visitor); |
| 314 FileWriterBase::trace(visitor); | 314 FileWriterBase::trace(visitor); |
| 315 ActiveDOMObject::trace(visitor); | 315 SuspendableObject::trace(visitor); |
| 316 } | 316 } |
| 317 | 317 |
| 318 } // namespace blink | 318 } // namespace blink |
| OLD | NEW |