| 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 17 matching lines...) Expand all Loading... |
| 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 29 */ | 29 */ |
| 30 | 30 |
| 31 #include "config.h" | 31 #include "config.h" |
| 32 | 32 |
| 33 #include "FileReaderLoader.h" | 33 #include "FileReaderLoader.h" |
| 34 | 34 |
| 35 #include "Blob.h" | 35 #include "Blob.h" |
| 36 #include "BlobURL.h" | 36 #include "BlobURL.h" |
| 37 #include "FileReaderLoaderClient.h" | 37 #include "FileReaderLoaderClient.h" |
| 38 #include "ResourceRequest.h" | |
| 39 #include "ResourceResponse.h" | |
| 40 #include "ScriptExecutionContext.h" | 38 #include "ScriptExecutionContext.h" |
| 41 #include "TextResourceDecoder.h" | 39 #include "TextResourceDecoder.h" |
| 42 #include "ThreadableBlobRegistry.h" | 40 #include "ThreadableBlobRegistry.h" |
| 43 #include "ThreadableLoader.h" | 41 #include "ThreadableLoader.h" |
| 42 #include "core/platform/network/ResourceRequest.h" |
| 43 #include "core/platform/network/ResourceResponse.h" |
| 44 #include <wtf/ArrayBuffer.h> | 44 #include <wtf/ArrayBuffer.h> |
| 45 #include <wtf/PassRefPtr.h> | 45 #include <wtf/PassRefPtr.h> |
| 46 #include <wtf/RefPtr.h> | 46 #include <wtf/RefPtr.h> |
| 47 #include <wtf/Vector.h> | |
| 48 #include <wtf/text/Base64.h> | 47 #include <wtf/text/Base64.h> |
| 49 #include <wtf/text/StringBuilder.h> | 48 #include <wtf/text/StringBuilder.h> |
| 49 #include <wtf/Vector.h> |
| 50 | 50 |
| 51 using namespace std; | 51 using namespace std; |
| 52 | 52 |
| 53 namespace WebCore { | 53 namespace WebCore { |
| 54 | 54 |
| 55 const int defaultBufferLength = 32768; | 55 const int defaultBufferLength = 32768; |
| 56 | 56 |
| 57 FileReaderLoader::FileReaderLoader(ReadType readType, FileReaderLoaderClient* cl
ient) | 57 FileReaderLoader::FileReaderLoader(ReadType readType, FileReaderLoaderClient* cl
ient) |
| 58 : m_readType(readType) | 58 : m_readType(readType) |
| 59 , m_client(client) | 59 , m_client(client) |
| (...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 386 void FileReaderLoader::setRange(unsigned start, unsigned length) | 386 void FileReaderLoader::setRange(unsigned start, unsigned length) |
| 387 { | 387 { |
| 388 ASSERT(length > 0); | 388 ASSERT(length > 0); |
| 389 m_hasRange = true; | 389 m_hasRange = true; |
| 390 m_rangeStart = start; | 390 m_rangeStart = start; |
| 391 m_rangeEnd = start + length - 1; | 391 m_rangeEnd = start + length - 1; |
| 392 } | 392 } |
| 393 #endif // ENABLE(STREAM) | 393 #endif // ENABLE(STREAM) |
| 394 | 394 |
| 395 } // namespace WebCore | 395 } // namespace WebCore |
| OLD | NEW |