| 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 | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * | 7 * |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 | 25 |
| 26 #ifndef IDBBindingUtilities_h | 26 #ifndef IDBBindingUtilities_h |
| 27 #define IDBBindingUtilities_h | 27 #define IDBBindingUtilities_h |
| 28 | 28 |
| 29 #include "bindings/v8/ScriptValue.h" | 29 #include "bindings/v8/ScriptValue.h" |
| 30 #include <v8.h> | 30 #include <v8.h> |
| 31 #include "wtf/Forward.h" | 31 #include "wtf/Forward.h" |
| 32 | 32 |
| 33 namespace WebCore { | 33 namespace WebCore { |
| 34 | 34 |
| 35 class BlobInfo; |
| 35 class DOMRequestState; | 36 class DOMRequestState; |
| 36 class IDBAny; | 37 class IDBAny; |
| 37 class IDBKey; | 38 class IDBKey; |
| 38 class IDBKeyPath; | 39 class IDBKeyPath; |
| 39 class IDBKeyRange; | 40 class IDBKeyRange; |
| 40 class SerializedScriptValue; | 41 class SerializedScriptValue; |
| 41 class SharedBuffer; | 42 class SharedBuffer; |
| 42 | 43 |
| 43 // For use by bindings/v8/custom: | 44 // For use by bindings/v8/custom: |
| 44 v8::Handle<v8::Value> toV8(IDBKey*, v8::Handle<v8::Object> creationContext, v8::
Isolate*); | 45 v8::Handle<v8::Value> toV8(IDBKey*, v8::Handle<v8::Object> creationContext, v8::
Isolate*); |
| 45 bool injectV8KeyIntoV8Value(v8::Handle<v8::Value> key, v8::Handle<v8::Value>, co
nst IDBKeyPath&, v8::Isolate*); | 46 bool injectV8KeyIntoV8Value(v8::Handle<v8::Value> key, v8::Handle<v8::Value>, co
nst IDBKeyPath&, v8::Isolate*); |
| 46 v8::Handle<v8::Value> deserializeIDBValueBuffer(SharedBuffer*, v8::Isolate*); | 47 v8::Handle<v8::Value> deserializeIDBValueBuffer(SharedBuffer*, const Vector<Blob
Info>*, v8::Isolate*); |
| 47 | 48 |
| 48 // For use by Source/modules/indexeddb: | 49 // For use by Source/modules/indexeddb: |
| 49 PassRefPtr<IDBKey> createIDBKeyFromScriptValueAndKeyPath(DOMRequestState*, const
ScriptValue&, const IDBKeyPath&); | 50 PassRefPtr<IDBKey> createIDBKeyFromScriptValueAndKeyPath(DOMRequestState*, const
ScriptValue&, const IDBKeyPath&); |
| 50 bool canInjectIDBKeyIntoScriptValue(DOMRequestState*, const ScriptValue&, const
IDBKeyPath&); | 51 bool canInjectIDBKeyIntoScriptValue(DOMRequestState*, const ScriptValue&, const
IDBKeyPath&); |
| 51 ScriptValue idbAnyToScriptValue(DOMRequestState*, PassRefPtr<IDBAny>); | 52 ScriptValue idbAnyToScriptValue(DOMRequestState*, PassRefPtr<IDBAny>); |
| 52 ScriptValue idbKeyToScriptValue(DOMRequestState*, PassRefPtr<IDBKey>); | 53 ScriptValue idbKeyToScriptValue(DOMRequestState*, PassRefPtr<IDBKey>); |
| 53 PassRefPtr<IDBKey> scriptValueToIDBKey(DOMRequestState*, const ScriptValue&); | 54 PassRefPtr<IDBKey> scriptValueToIDBKey(DOMRequestState*, const ScriptValue&); |
| 54 PassRefPtr<IDBKeyRange> scriptValueToIDBKeyRange(DOMRequestState*, const ScriptV
alue&); | 55 PassRefPtr<IDBKeyRange> scriptValueToIDBKeyRange(DOMRequestState*, const ScriptV
alue&); |
| 55 | 56 |
| 56 #ifndef NDEBUG | 57 #ifndef NDEBUG |
| 57 void assertPrimaryKeyValidOrInjectable(DOMRequestState*, PassRefPtr<SharedBuffer
>, PassRefPtr<IDBKey>, const IDBKeyPath&); | 58 void assertPrimaryKeyValidOrInjectable(DOMRequestState*, PassRefPtr<SharedBuffer
>, const Vector<BlobInfo>*, PassRefPtr<IDBKey>, const IDBKeyPath&); |
| 58 #endif | 59 #endif |
| 59 | 60 |
| 60 } // namespace WebCore | 61 } // namespace WebCore |
| 61 | 62 |
| 62 #endif // IDBBindingUtilities_h | 63 #endif // IDBBindingUtilities_h |
| OLD | NEW |