| 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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 void cancel(); | 64 void cancel(); |
| 65 | 65 |
| 66 // ThreadableLoaderClient | 66 // ThreadableLoaderClient |
| 67 virtual void didReceiveResponse(unsigned long, const ResourceResponse&); | 67 virtual void didReceiveResponse(unsigned long, const ResourceResponse&); |
| 68 virtual void didReceiveData(const char*, int); | 68 virtual void didReceiveData(const char*, int); |
| 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) | |
| 75 PassRefPtr<Blob> blobResult(); | |
| 76 #endif // ENABLE(STREAM) | |
| 77 unsigned bytesLoaded() const { return m_bytesLoaded; } | 74 unsigned bytesLoaded() const { return m_bytesLoaded; } |
| 78 unsigned totalBytes() const { return m_totalBytes; } | 75 unsigned totalBytes() const { return m_totalBytes; } |
| 79 FileError::ErrorCode errorCode() const { return m_errorCode; } | 76 FileError::ErrorCode errorCode() const { return m_errorCode; } |
| 80 | 77 |
| 81 void setEncoding(const String&); | 78 void setEncoding(const String&); |
| 82 void setDataType(const String& dataType) { m_dataType = dataType; } | 79 void setDataType(const String& dataType) { m_dataType = dataType; } |
| 83 #if ENABLE(STREAM) | |
| 84 void setRange(unsigned, unsigned); | |
| 85 #endif // ENABLE(STREAM) | |
| 86 | 80 |
| 87 private: | 81 private: |
| 88 void terminate(); | 82 void terminate(); |
| 89 void cleanup(); | 83 void cleanup(); |
| 90 void failed(FileError::ErrorCode); | 84 void failed(FileError::ErrorCode); |
| 91 void convertToText(); | 85 void convertToText(); |
| 92 void convertToDataURL(); | 86 void convertToDataURL(); |
| 93 | 87 |
| 94 bool isCompleted() const; | 88 bool isCompleted() const; |
| 95 | 89 |
| (...skipping 23 matching lines...) Expand all Loading... |
| 119 bool m_hasRange; | 113 bool m_hasRange; |
| 120 unsigned m_rangeStart; | 114 unsigned m_rangeStart; |
| 121 unsigned m_rangeEnd; | 115 unsigned m_rangeEnd; |
| 122 | 116 |
| 123 FileError::ErrorCode m_errorCode; | 117 FileError::ErrorCode m_errorCode; |
| 124 }; | 118 }; |
| 125 | 119 |
| 126 } // namespace WebCore | 120 } // namespace WebCore |
| 127 | 121 |
| 128 #endif // FileReaderLoader_h | 122 #endif // FileReaderLoader_h |
| OLD | NEW |