| 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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 public: | 54 public: |
| 55 static Blob* create(ExecutionContext*, ExceptionState&) | 55 static Blob* create(ExecutionContext*, ExceptionState&) |
| 56 { | 56 { |
| 57 return new Blob(BlobDataHandle::create()); | 57 return new Blob(BlobDataHandle::create()); |
| 58 } | 58 } |
| 59 | 59 |
| 60 static Blob* create(ExecutionContext*, const HeapVector<ArrayBufferOrArrayBu
fferViewOrBlobOrUSVString>&, const BlobPropertyBag&, ExceptionState&); | 60 static Blob* create(ExecutionContext*, const HeapVector<ArrayBufferOrArrayBu
fferViewOrBlobOrUSVString>&, const BlobPropertyBag&, ExceptionState&); |
| 61 | 61 |
| 62 static Blob* create(PassRefPtr<BlobDataHandle> blobDataHandle) | 62 static Blob* create(PassRefPtr<BlobDataHandle> blobDataHandle) |
| 63 { | 63 { |
| 64 return new Blob(blobDataHandle); | 64 return new Blob(std::move(blobDataHandle)); |
| 65 } | 65 } |
| 66 | 66 |
| 67 static Blob* create(const unsigned char* data, size_t bytes, const String& c
ontentType); | 67 static Blob* create(const unsigned char* data, size_t bytes, const String& c
ontentType); |
| 68 | 68 |
| 69 ~Blob() override; | 69 ~Blob() override; |
| 70 | 70 |
| 71 virtual unsigned long long size() const { return m_blobDataHandle->size(); } | 71 virtual unsigned long long size() const { return m_blobDataHandle->size(); } |
| 72 virtual Blob* slice(long long start, long long end, const String& contentTyp
e, ExceptionState&) const; | 72 virtual Blob* slice(long long start, long long end, const String& contentTyp
e, ExceptionState&) const; |
| 73 | 73 |
| 74 // To allow ExceptionState to be passed in last, manually enumerate the opti
onal argument overloads. | 74 // To allow ExceptionState to be passed in last, manually enumerate the opti
onal argument overloads. |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 116 private: | 116 private: |
| 117 Blob(); | 117 Blob(); |
| 118 | 118 |
| 119 RefPtr<BlobDataHandle> m_blobDataHandle; | 119 RefPtr<BlobDataHandle> m_blobDataHandle; |
| 120 bool m_isClosed; | 120 bool m_isClosed; |
| 121 }; | 121 }; |
| 122 | 122 |
| 123 } // namespace blink | 123 } // namespace blink |
| 124 | 124 |
| 125 #endif // Blob_h | 125 #endif // Blob_h |
| OLD | NEW |