| Index: Source/WebCore/bindings/dart/DartScriptValueDeserializer.h
|
| diff --git a/Source/WebCore/bindings/dart/DartScriptValueDeserializer.h b/Source/WebCore/bindings/dart/DartScriptValueDeserializer.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..4fd3ba12f2576926c70cf448689f390750490901
|
| --- /dev/null
|
| +++ b/Source/WebCore/bindings/dart/DartScriptValueDeserializer.h
|
| @@ -0,0 +1,141 @@
|
| +/*
|
| + * 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 DartScriptValueDeserializer_h
|
| +#define DartScriptValueDeserializer_h
|
| +
|
| +#include "ScriptValueDeserializer.h"
|
| +
|
| +#include <dart_api.h>
|
| +
|
| +namespace WebCore {
|
| +
|
| +class DartScriptValueDeserializer : public ScriptValueDeserializer {
|
| +public:
|
| + DartScriptValueDeserializer()
|
| + : m_result(0)
|
| + {
|
| + }
|
| +
|
| + Dart_Handle result() { return m_result; }
|
| +
|
| + virtual bool newArray(uint32_t length)
|
| + {
|
| + // FIXME: proper implementation if necessary.
|
| + return false;
|
| + }
|
| +
|
| + virtual bool newObject()
|
| + {
|
| + // FIXME: proper implementation if necessary.
|
| + return false;
|
| + }
|
| +
|
| + virtual bool tryGetObjectFromObjectReference(uint32_t reference)
|
| + {
|
| + // FIXME: proper implementation if necessary.
|
| + return false;
|
| + }
|
| +
|
| + virtual uint32_t objectReferenceCount()
|
| + {
|
| + // FIXME: proper implementation if necessary.
|
| + return 0;
|
| + }
|
| +
|
| + virtual void addReferenceForTop()
|
| + {
|
| + // FIXME: proper implementation if necessary.
|
| + ASSERT_NOT_REACHED();
|
| + }
|
| +
|
| +
|
| + // FIXME: proper implementation for missing methods if necessary.
|
| + virtual bool pushUndefined() { return false; }
|
| + virtual bool pushNull();
|
| + virtual bool pushTrue() { return false; }
|
| + virtual bool pushTrueObject() { return false; }
|
| + virtual bool pushFalse() { return false; }
|
| + virtual bool pushFalseObject() { return false; }
|
| + virtual bool pushScriptString(const char* data, uint32_t length);
|
| + virtual bool pushScriptStringObject() { return false; }
|
| + virtual bool pushInt32(int32_t value) { return false; }
|
| + virtual bool pushUInt32(uint32_t value) { return false; }
|
| + virtual bool pushDate(double numberValue) { return false; }
|
| + virtual bool pushNumber(double value) { return false; }
|
| + virtual bool pushNumberObject(double value) { return false; }
|
| + virtual bool pushBlob(PassRefPtr<Blob> blob);
|
| + virtual bool pushFile(PassRefPtr<File> file);
|
| + virtual bool pushFileList(PassRefPtr<FileList> fileList);
|
| + virtual bool pushImageData(PassRefPtr<ImageData> imageData);
|
| +
|
| + virtual bool pushArray(uint32_t length)
|
| + {
|
| + // FIXME: proper implementation if necessary.
|
| + return false;
|
| + }
|
| +
|
| + virtual bool pushRegExp(uint32_t flags)
|
| + {
|
| + // FIXME: proper implementation if necessary.
|
| + return false;
|
| + }
|
| +
|
| + virtual bool pushObject(uint32_t numProperties)
|
| + {
|
| + // FIXME: proper implementation if necessary.
|
| + return false;
|
| + }
|
| +
|
| + virtual bool pushSparseArray(uint32_t numProperties, uint32_t length)
|
| + {
|
| + // FIXME: proper implementation if necessary.
|
| + return false;
|
| + }
|
| +
|
| + // FIXME: proper implementation for missing methods if necessary.
|
| + virtual bool pushInt8Array(uint32_t byteOffset, uint32_t byteLength) { return false; }
|
| + virtual bool pushUint8Array(uint32_t byteOffset, uint32_t byteLength) { return false; }
|
| + virtual bool pushInt16Array(uint32_t byteOffset, uint32_t byteLength) { return false; }
|
| + virtual bool pushUint16Array(uint32_t byteOffset, uint32_t byteLength) { return false; }
|
| + virtual bool pushInt32Array(uint32_t byteOffset, uint32_t byteLength) { return false; }
|
| + virtual bool pushUint32Array(uint32_t byteOffset, uint32_t byteLength) { return false; }
|
| + virtual bool pushFloat32Array(uint32_t byteOffset, uint32_t byteLength) { return false; }
|
| + virtual bool pushFloat64Array(uint32_t byteOffset, uint32_t byteLength) { return false; }
|
| + virtual bool pushDataView(uint32_t byteOffset, uint32_t byteLength) { return false; }
|
| + virtual bool pushArrayBuffer(PassRefPtr<ArrayBuffer> arrayBuffer);
|
| +
|
| +private:
|
| + Dart_Handle m_result;
|
| +};
|
| +
|
| +} // namespace WebCore
|
| +
|
| +#endif // DartScriptValueDeserializer_h
|
|
|