| 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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 69 virtual void didFinishLoading(unsigned long, double); | 69 virtual void didFinishLoading(unsigned long, double); |
| 70 virtual void didFail(const ResourceError&); | 70 virtual void didFail(const ResourceError&); |
| 71 | 71 |
| 72 String stringResult(); | 72 String stringResult(); |
| 73 PassRefPtr<ArrayBuffer> arrayBufferResult() const; | 73 PassRefPtr<ArrayBuffer> arrayBufferResult() const; |
| 74 #if ENABLE(STREAM) | 74 #if ENABLE(STREAM) |
| 75 PassRefPtr<Blob> blobResult(); | 75 PassRefPtr<Blob> blobResult(); |
| 76 #endif // ENABLE(STREAM) | 76 #endif // ENABLE(STREAM) |
| 77 unsigned bytesLoaded() const { return m_bytesLoaded; } | 77 unsigned bytesLoaded() const { return m_bytesLoaded; } |
| 78 unsigned totalBytes() const { return m_totalBytes; } | 78 unsigned totalBytes() const { return m_totalBytes; } |
| 79 int errorCode() const { return m_errorCode; } | 79 FileError::ErrorCode errorCode() const { return m_errorCode; } |
| 80 | 80 |
| 81 void setEncoding(const String&); | 81 void setEncoding(const String&); |
| 82 void setDataType(const String& dataType) { m_dataType = dataType; } | 82 void setDataType(const String& dataType) { m_dataType = dataType; } |
| 83 #if ENABLE(STREAM) | 83 #if ENABLE(STREAM) |
| 84 void setRange(unsigned, unsigned); | 84 void setRange(unsigned, unsigned); |
| 85 #endif // ENABLE(STREAM) | 85 #endif // ENABLE(STREAM) |
| 86 | 86 |
| 87 private: | 87 private: |
| 88 void terminate(); | 88 void terminate(); |
| 89 void cleanup(); | 89 void cleanup(); |
| 90 void failed(int errorCode); | 90 void failed(FileError::ErrorCode); |
| 91 void convertToText(); | 91 void convertToText(); |
| 92 void convertToDataURL(); | 92 void convertToDataURL(); |
| 93 | 93 |
| 94 bool isCompleted() const; | 94 bool isCompleted() const; |
| 95 | 95 |
| 96 static FileError::ErrorCode httpStatusCodeToErrorCode(int); | 96 static FileError::ErrorCode httpStatusCodeToErrorCode(int); |
| 97 | 97 |
| 98 ReadType m_readType; | 98 ReadType m_readType; |
| 99 FileReaderLoaderClient* m_client; | 99 FileReaderLoaderClient* m_client; |
| 100 WTF::TextEncoding m_encoding; | 100 WTF::TextEncoding m_encoding; |
| (...skipping 12 matching lines...) Expand all Loading... |
| 113 RefPtr<TextResourceDecoder> m_decoder; | 113 RefPtr<TextResourceDecoder> m_decoder; |
| 114 | 114 |
| 115 bool m_variableLength; | 115 bool m_variableLength; |
| 116 unsigned m_bytesLoaded; | 116 unsigned m_bytesLoaded; |
| 117 unsigned m_totalBytes; | 117 unsigned m_totalBytes; |
| 118 | 118 |
| 119 bool m_hasRange; | 119 bool m_hasRange; |
| 120 unsigned m_rangeStart; | 120 unsigned m_rangeStart; |
| 121 unsigned m_rangeEnd; | 121 unsigned m_rangeEnd; |
| 122 | 122 |
| 123 int m_errorCode; | 123 FileError::ErrorCode m_errorCode; |
| 124 }; | 124 }; |
| 125 | 125 |
| 126 } // namespace WebCore | 126 } // namespace WebCore |
| 127 | 127 |
| 128 #endif // FileReaderLoader_h | 128 #endif // FileReaderLoader_h |
| OLD | NEW |