Index: Source/WebCore/bindings/public/ScriptValueDeserializer.h |
diff --git a/Source/WebCore/bindings/public/ScriptValueDeserializer.h b/Source/WebCore/bindings/public/ScriptValueDeserializer.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..411982f2807550a9fe12085fd834a18ff12bc685 |
--- /dev/null |
+++ b/Source/WebCore/bindings/public/ScriptValueDeserializer.h |
@@ -0,0 +1,90 @@ |
+/* |
+ * Copyright (C) 2011 Google Inc. All rights reserved. |
+ * |
+ * Redistribution and use in source and binary forms, with or without |
+ * modification, are permitted provided that the following conditions are |
+ * met: |
+ * |
+ * * Redistributions of source code must retain the above copyright |
+ * notice, this list of conditions and the following disclaimer. |
+ * * Redistributions in binary form must reproduce the above |
+ * copyright notice, this list of conditions and the following disclaimer |
+ * in the documentation and/or other materials provided with the |
+ * distribution. |
+ * * Neither the name of Google Inc. nor the names of its |
+ * contributors may be used to endorse or promote products derived from |
+ * this software without specific prior written permission. |
+ * |
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
+ */ |
+ |
+#ifndef ScriptValueDeserializer_h |
+#define ScriptValueDeserializer_h |
+ |
+#include <stdint.h> |
+#include <wtf/PassRefPtr.h> |
+ |
+namespace WebCore { |
+ |
+class ArrayBuffer; |
+class Blob; |
+class File; |
+class FileList; |
+class ImageData; |
+ |
+class ScriptValueDeserializer { |
+public: |
+ virtual ~ScriptValueDeserializer() { } |
+ |
+ virtual uint32_t objectReferenceCount() = 0; |
+ virtual void addReferenceForTop() = 0; |
+ virtual bool tryGetObjectFromObjectReference(uint32_t reference) = 0; |
+ virtual bool newArray(uint32_t length) = 0; |
+ virtual bool newObject() = 0; |
+ |
+ virtual bool pushUndefined() = 0; |
+ virtual bool pushNull() = 0; |
+ virtual bool pushTrue() = 0; |
+ virtual bool pushTrueObject() = 0; |
+ virtual bool pushFalse() = 0; |
+ virtual bool pushFalseObject() = 0; |
+ virtual bool pushScriptString(const char* data, uint32_t length) = 0; |
+ virtual bool pushScriptStringObject() = 0; |
+ virtual bool pushInt32(int32_t) = 0; |
+ virtual bool pushUInt32(uint32_t) = 0; |
+ virtual bool pushDate(double numberValue) = 0; |
+ virtual bool pushNumber(double) = 0; |
+ virtual bool pushNumberObject(double) = 0; |
+ virtual bool pushBlob(PassRefPtr<Blob>) = 0; |
+ virtual bool pushFile(PassRefPtr<File>) = 0; |
+ virtual bool pushFileList(PassRefPtr<FileList>) = 0; |
+ virtual bool pushImageData(PassRefPtr<ImageData>) = 0; |
+ virtual bool pushArray(uint32_t length) = 0; |
+ virtual bool pushRegExp(uint32_t flags) = 0; |
+ virtual bool pushObject(uint32_t numProperties) = 0; |
+ virtual bool pushSparseArray(uint32_t numProperties, uint32_t length) = 0; |
+ virtual bool pushInt8Array(uint32_t byteOffset, uint32_t byteLength) = 0; |
+ virtual bool pushUint8Array(uint32_t byteOffset, uint32_t byteLength) = 0; |
+ virtual bool pushInt16Array(uint32_t byteOffset, uint32_t byteLength) = 0; |
+ virtual bool pushUint16Array(uint32_t byteOffset, uint32_t byteLength) = 0; |
+ virtual bool pushInt32Array(uint32_t byteOffset, uint32_t byteLength) = 0; |
+ virtual bool pushUint32Array(uint32_t byteOffset, uint32_t byteLength) = 0; |
+ virtual bool pushFloat32Array(uint32_t byteOffset, uint32_t byteLength) = 0; |
+ virtual bool pushFloat64Array(uint32_t byteOffset, uint32_t byteLength) = 0; |
+ virtual bool pushDataView(uint32_t byteOffset, uint32_t byteLength) = 0; |
+ virtual bool pushArrayBuffer(PassRefPtr<ArrayBuffer>) = 0; |
+}; |
+ |
+} // namespace WebCore |
+ |
+#endif // ScriptValueDeserializer_h |