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 15 matching lines...) Expand all Loading... |
26 #ifndef IDBBindingUtilities_h | 26 #ifndef IDBBindingUtilities_h |
27 #define IDBBindingUtilities_h | 27 #define IDBBindingUtilities_h |
28 | 28 |
29 #include "bindings/core/v8/ScriptState.h" | 29 #include "bindings/core/v8/ScriptState.h" |
30 #include "bindings/core/v8/ScriptValue.h" | 30 #include "bindings/core/v8/ScriptValue.h" |
31 #include "wtf/Forward.h" | 31 #include "wtf/Forward.h" |
32 #include <v8.h> | 32 #include <v8.h> |
33 | 33 |
34 namespace blink { | 34 namespace blink { |
35 | 35 |
36 class WebBlobInfo; | |
37 | |
38 } | |
39 | |
40 namespace blink { | |
41 | |
42 class IDBAny; | 36 class IDBAny; |
43 class IDBKey; | 37 class IDBKey; |
44 class IDBKeyPath; | 38 class IDBKeyPath; |
45 class IDBKeyRange; | 39 class IDBKeyRange; |
46 class SerializedScriptValue; | 40 class SerializedScriptValue; |
47 class SharedBuffer; | 41 class SharedBuffer; |
| 42 class WebBlobInfo; |
48 | 43 |
49 // Exposed for unit testing: | 44 // Exposed for unit testing: |
50 bool injectV8KeyIntoV8Value(v8::Isolate*, v8::Handle<v8::Value> key, v8::Handle<
v8::Value>, const IDBKeyPath&); | 45 bool injectV8KeyIntoV8Value(v8::Isolate*, v8::Handle<v8::Value> key, v8::Handle<
v8::Value>, const IDBKeyPath&); |
51 | 46 |
52 // For use by Source/modules/indexeddb: | 47 // For use by Source/modules/indexeddb: |
53 IDBKey* createIDBKeyFromScriptValueAndKeyPath(v8::Isolate*, const ScriptValue&,
const IDBKeyPath&); | 48 IDBKey* createIDBKeyFromScriptValueAndKeyPath(v8::Isolate*, const ScriptValue&,
const IDBKeyPath&); |
54 bool canInjectIDBKeyIntoScriptValue(v8::Isolate*, const ScriptValue&, const IDBK
eyPath&); | 49 bool canInjectIDBKeyIntoScriptValue(v8::Isolate*, const ScriptValue&, const IDBK
eyPath&); |
55 ScriptValue idbAnyToScriptValue(ScriptState*, IDBAny*); | 50 ScriptValue idbAnyToScriptValue(ScriptState*, IDBAny*); |
56 ScriptValue idbKeyToScriptValue(ScriptState*, IDBKey*); | 51 ScriptValue idbKeyToScriptValue(ScriptState*, IDBKey*); |
57 IDBKey* scriptValueToIDBKey(v8::Isolate*, const ScriptValue&); | 52 IDBKey* scriptValueToIDBKey(v8::Isolate*, const ScriptValue&); |
58 IDBKeyRange* scriptValueToIDBKeyRange(v8::Isolate*, const ScriptValue&); | 53 IDBKeyRange* scriptValueToIDBKeyRange(v8::Isolate*, const ScriptValue&); |
59 ScriptValue deserializeScriptValue(ScriptState*, SerializedScriptValue*, const V
ector<blink::WebBlobInfo>*); | 54 ScriptValue deserializeScriptValue(ScriptState*, SerializedScriptValue*, const V
ector<blink::WebBlobInfo>*); |
60 | 55 |
61 #if ENABLE(ASSERT) | 56 #if ENABLE(ASSERT) |
62 void assertPrimaryKeyValidOrInjectable(ScriptState*, PassRefPtr<SharedBuffer>, c
onst Vector<blink::WebBlobInfo>*, IDBKey*, const IDBKeyPath&); | 57 void assertPrimaryKeyValidOrInjectable(ScriptState*, PassRefPtr<SharedBuffer>, c
onst Vector<blink::WebBlobInfo>*, IDBKey*, const IDBKeyPath&); |
63 #endif | 58 #endif |
64 | 59 |
65 } // namespace blink | 60 } // namespace blink |
66 | 61 |
67 #endif // IDBBindingUtilities_h | 62 #endif // IDBBindingUtilities_h |
OLD | NEW |