| 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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 | 45 |
| 46 namespace blink { | 46 namespace blink { |
| 47 | 47 |
| 48 class BlobPropertyBag; | 48 class BlobPropertyBag; |
| 49 class ExceptionState; | 49 class ExceptionState; |
| 50 class ExecutionContext; | 50 class ExecutionContext; |
| 51 | 51 |
| 52 class CORE_EXPORT Blob : public GarbageCollectedFinalized<Blob>, public ScriptWr
appable, public URLRegistrable, public ImageBitmapSource { | 52 class CORE_EXPORT Blob : public GarbageCollectedFinalized<Blob>, public ScriptWr
appable, public URLRegistrable, public ImageBitmapSource { |
| 53 DEFINE_WRAPPERTYPEINFO(); | 53 DEFINE_WRAPPERTYPEINFO(); |
| 54 public: | 54 public: |
| 55 static Blob* create(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(const HeapVector<ArrayBufferOrArrayBufferViewOrBlobOrStr
ing>&, const BlobPropertyBag&, ExceptionState&); | 60 static Blob* create(ExecutionContext*, const HeapVector<ArrayBufferOrArrayBu
fferViewOrBlobOrString>&, 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(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 |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 135 private: | 135 private: |
| 136 Blob(); | 136 Blob(); |
| 137 | 137 |
| 138 RefPtr<BlobDataHandle> m_blobDataHandle; | 138 RefPtr<BlobDataHandle> m_blobDataHandle; |
| 139 bool m_hasBeenClosed; | 139 bool m_hasBeenClosed; |
| 140 }; | 140 }; |
| 141 | 141 |
| 142 } // namespace blink | 142 } // namespace blink |
| 143 | 143 |
| 144 #endif // Blob_h | 144 #endif // Blob_h |
| OLD | NEW |