| 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 10 matching lines...) Expand all Loading... |
| 21 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | 21 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES |
| 22 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | 22 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; |
| 23 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | 23 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND |
| 24 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 24 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | 25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
| 26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 27 */ | 27 */ |
| 28 #ifndef IDBFactory_h | 28 #ifndef IDBFactory_h |
| 29 #define IDBFactory_h | 29 #define IDBFactory_h |
| 30 | 30 |
| 31 #include "Source/modules/indexeddb/indexed_db.mojom-blink.h" |
| 31 #include "bindings/core/v8/ScriptWrappable.h" | 32 #include "bindings/core/v8/ScriptWrappable.h" |
| 32 #include "modules/indexeddb/IDBOpenDBRequest.h" | 33 #include "modules/indexeddb/IDBOpenDBRequest.h" |
| 33 #include "platform/heap/Handle.h" | 34 #include "platform/heap/Handle.h" |
| 34 #include "wtf/text/WTFString.h" | 35 #include "wtf/text/WTFString.h" |
| 35 | 36 |
| 36 namespace blink { | 37 namespace blink { |
| 37 | 38 |
| 38 class ExceptionState; | 39 class ExceptionState; |
| 39 class ScriptState; | 40 class ScriptState; |
| 40 | 41 |
| 41 class IDBFactory final : public GarbageCollected<IDBFactory>, public ScriptWrapp
able { | 42 class IDBFactory final : public GarbageCollectedFinalized<IDBFactory>, public Sc
riptWrappable { |
| 42 DEFINE_WRAPPERTYPEINFO(); | 43 DEFINE_WRAPPERTYPEINFO(); |
| 43 public: | 44 public: |
| 44 static IDBFactory* create() | 45 static IDBFactory* create() |
| 45 { | 46 { |
| 46 return new IDBFactory(); | 47 return new IDBFactory(); |
| 47 } | 48 } |
| 49 |
| 50 virtual ~IDBFactory(); |
| 51 |
| 48 DEFINE_INLINE_VIRTUAL_TRACE() { } | 52 DEFINE_INLINE_VIRTUAL_TRACE() { } |
| 49 | 53 |
| 50 IDBRequest* getDatabaseNames(ScriptState*, ExceptionState&); | 54 IDBRequest* getDatabaseNames(ScriptState*, ExceptionState&); |
| 51 | 55 |
| 52 IDBOpenDBRequest* open(ScriptState*, const String& name, ExceptionState&); | 56 IDBOpenDBRequest* open(ScriptState*, const String& name, ExceptionState&); |
| 53 IDBOpenDBRequest* open(ScriptState*, const String& name, unsigned long long
version, ExceptionState&); | 57 IDBOpenDBRequest* open(ScriptState*, const String& name, unsigned long long
version, ExceptionState&); |
| 54 IDBOpenDBRequest* deleteDatabase(ScriptState*, const String& name, Exception
State&); | 58 IDBOpenDBRequest* deleteDatabase(ScriptState*, const String& name, Exception
State&); |
| 55 | 59 |
| 56 short cmp(ScriptState*, const ScriptValue& first, const ScriptValue& second,
ExceptionState&); | 60 short cmp(ScriptState*, const ScriptValue& first, const ScriptValue& second,
ExceptionState&); |
| 57 | 61 |
| 58 private: | 62 private: |
| 59 IDBFactory(); | 63 IDBFactory(); |
| 60 | 64 |
| 61 IDBOpenDBRequest* openInternal(ScriptState*, const String& name, int64_t ver
sion, ExceptionState&); | 65 IDBOpenDBRequest* openInternal(ScriptState*, const String& name, int64_t ver
sion, ExceptionState&); |
| 66 |
| 67 indexed_db::mojom::blink::DatabaseFactoryPtr m_proxy; |
| 62 }; | 68 }; |
| 63 | 69 |
| 64 } // namespace blink | 70 } // namespace blink |
| 65 | 71 |
| 66 #endif // IDBFactory_h | 72 #endif // IDBFactory_h |
| OLD | NEW |