| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009, 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2009, 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 18 matching lines...) Expand all Loading... |
| 29 */ | 29 */ |
| 30 | 30 |
| 31 #ifndef SerializedScriptValue_h | 31 #ifndef SerializedScriptValue_h |
| 32 #define SerializedScriptValue_h | 32 #define SerializedScriptValue_h |
| 33 | 33 |
| 34 #include "bindings/core/v8/ScriptValue.h" | 34 #include "bindings/core/v8/ScriptValue.h" |
| 35 #include "bindings/core/v8/Transferables.h" | 35 #include "bindings/core/v8/Transferables.h" |
| 36 #include "core/CoreExport.h" | 36 #include "core/CoreExport.h" |
| 37 #include "wtf/HashMap.h" | 37 #include "wtf/HashMap.h" |
| 38 #include "wtf/ThreadSafeRefCounted.h" | 38 #include "wtf/ThreadSafeRefCounted.h" |
| 39 #include "wtf/typed_arrays/ArrayBufferContents.h" |
| 40 #include <memory> |
| 39 #include <v8.h> | 41 #include <v8.h> |
| 40 | 42 |
| 41 namespace WTF { | |
| 42 | |
| 43 class ArrayBufferContents; | |
| 44 | |
| 45 } | |
| 46 | |
| 47 namespace blink { | 43 namespace blink { |
| 48 | 44 |
| 49 class BlobDataHandle; | 45 class BlobDataHandle; |
| 50 class Transferables; | 46 class Transferables; |
| 51 class ExceptionState; | 47 class ExceptionState; |
| 52 class StaticBitmapImage; | 48 class StaticBitmapImage; |
| 53 class WebBlobInfo; | 49 class WebBlobInfo; |
| 54 | 50 |
| 55 typedef HashMap<String, RefPtr<BlobDataHandle>> BlobDataHandleMap; | 51 typedef HashMap<String, RefPtr<BlobDataHandle>> BlobDataHandleMap; |
| 56 typedef Vector<WebBlobInfo> WebBlobInfoArray; | 52 typedef Vector<WebBlobInfo> WebBlobInfoArray; |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 124 String& data() { return m_data; } | 120 String& data() { return m_data; } |
| 125 void setData(const String& data) { m_data = data; } | 121 void setData(const String& data) { m_data = data; } |
| 126 void transferArrayBuffers(v8::Isolate*, const ArrayBufferArray&, ExceptionSt
ate&); | 122 void transferArrayBuffers(v8::Isolate*, const ArrayBufferArray&, ExceptionSt
ate&); |
| 127 void transferImageBitmaps(v8::Isolate*, const ImageBitmapArray&, ExceptionSt
ate&); | 123 void transferImageBitmaps(v8::Isolate*, const ImageBitmapArray&, ExceptionSt
ate&); |
| 128 void transferOffscreenCanvas(v8::Isolate*, const OffscreenCanvasArray&, Exce
ptionState&); | 124 void transferOffscreenCanvas(v8::Isolate*, const OffscreenCanvasArray&, Exce
ptionState&); |
| 129 ArrayBufferContentsArray* getArrayBufferContentsArray() { return m_arrayBuff
erContentsArray.get(); } | 125 ArrayBufferContentsArray* getArrayBufferContentsArray() { return m_arrayBuff
erContentsArray.get(); } |
| 130 ImageBitmapContentsArray* getImageBitmapContentsArray() { return m_imageBitm
apContentsArray.get(); } | 126 ImageBitmapContentsArray* getImageBitmapContentsArray() { return m_imageBitm
apContentsArray.get(); } |
| 131 | 127 |
| 132 private: | 128 private: |
| 133 String m_data; | 129 String m_data; |
| 134 OwnPtr<ArrayBufferContentsArray> m_arrayBufferContentsArray; | 130 std::unique_ptr<ArrayBufferContentsArray> m_arrayBufferContentsArray; |
| 135 OwnPtr<ImageBitmapContentsArray> m_imageBitmapContentsArray; | 131 std::unique_ptr<ImageBitmapContentsArray> m_imageBitmapContentsArray; |
| 136 BlobDataHandleMap m_blobDataHandles; | 132 BlobDataHandleMap m_blobDataHandles; |
| 137 intptr_t m_externallyAllocatedMemory; | 133 intptr_t m_externallyAllocatedMemory; |
| 138 | 134 |
| 139 friend class SerializedScriptValueFactory; | 135 friend class SerializedScriptValueFactory; |
| 140 }; | 136 }; |
| 141 | 137 |
| 142 } // namespace blink | 138 } // namespace blink |
| 143 | 139 |
| 144 #endif // SerializedScriptValue_h | 140 #endif // SerializedScriptValue_h |
| OLD | NEW |