| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 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 25 matching lines...) Expand all Loading... |
| 36 #include "modules/indexeddb/IDBCallbacks.h" | 36 #include "modules/indexeddb/IDBCallbacks.h" |
| 37 #include "modules/indexeddb/IDBDatabaseCallbacks.h" | 37 #include "modules/indexeddb/IDBDatabaseCallbacks.h" |
| 38 #include "modules/indexeddb/IDBKeyRange.h" | 38 #include "modules/indexeddb/IDBKeyRange.h" |
| 39 #include "modules/indexeddb/IDBMetadata.h" | 39 #include "modules/indexeddb/IDBMetadata.h" |
| 40 #include "public/WebData.h" | 40 #include "public/WebData.h" |
| 41 | 41 |
| 42 using namespace WebCore; | 42 using namespace WebCore; |
| 43 | 43 |
| 44 namespace WebKit { | 44 namespace WebKit { |
| 45 | 45 |
| 46 PassRefPtr<IDBDatabaseBackendInterface> IDBDatabaseBackendProxy::create(PassOwnP
tr<WebIDBDatabase> database) | 46 IDBDatabaseBackendInterface* IDBDatabaseBackendProxy::create(PassOwnPtr<WebIDBDa
tabase> database) |
| 47 { | 47 { |
| 48 return adoptRef(new IDBDatabaseBackendProxy(database)); | 48 return new IDBDatabaseBackendProxy(database); |
| 49 } | 49 } |
| 50 | 50 |
| 51 IDBDatabaseBackendProxy::IDBDatabaseBackendProxy(PassOwnPtr<WebIDBDatabase> data
base) | 51 IDBDatabaseBackendProxy::IDBDatabaseBackendProxy(PassOwnPtr<WebIDBDatabase> data
base) |
| 52 : m_webIDBDatabase(database) | 52 : m_webIDBDatabase(database) |
| 53 { | 53 { |
| 54 } | 54 } |
| 55 | 55 |
| 56 IDBDatabaseBackendProxy::~IDBDatabaseBackendProxy() | 56 IDBDatabaseBackendProxy::~IDBDatabaseBackendProxy() |
| 57 { | 57 { |
| 58 } | 58 } |
| 59 | 59 |
| 60 void IDBDatabaseBackendProxy::createObjectStore(int64_t transactionId, int64_t o
bjectStoreId, const String& name, const IDBKeyPath& keyPath, bool autoIncrement) | 60 void IDBDatabaseBackendProxy::createObjectStore(int64_t transactionId, int64_t o
bjectStoreId, const String& name, const IDBKeyPath& keyPath, bool autoIncrement) |
| 61 { | 61 { |
| 62 if (m_webIDBDatabase) | 62 if (m_webIDBDatabase) |
| 63 m_webIDBDatabase->createObjectStore(transactionId, objectStoreId, name,
keyPath, autoIncrement); | 63 m_webIDBDatabase->createObjectStore(transactionId, objectStoreId, name,
keyPath, autoIncrement); |
| 64 } | 64 } |
| 65 | 65 |
| 66 void IDBDatabaseBackendProxy::deleteObjectStore(int64_t transactionId, int64_t o
bjectStoreId) | 66 void IDBDatabaseBackendProxy::deleteObjectStore(int64_t transactionId, int64_t o
bjectStoreId) |
| 67 { | 67 { |
| 68 if (m_webIDBDatabase) | 68 if (m_webIDBDatabase) |
| 69 m_webIDBDatabase->deleteObjectStore(transactionId, objectStoreId); | 69 m_webIDBDatabase->deleteObjectStore(transactionId, objectStoreId); |
| 70 } | 70 } |
| 71 | 71 |
| 72 void IDBDatabaseBackendProxy::createTransaction(int64_t id, PassRefPtr<IDBDataba
seCallbacks> callbacks, const Vector<int64_t>& objectStoreIds, unsigned short mo
de) | 72 void IDBDatabaseBackendProxy::createTransaction(int64_t id, IDBDatabaseCallbacks
* callbacks, const Vector<int64_t>& objectStoreIds, unsigned short mode) |
| 73 { | 73 { |
| 74 m_webIDBDatabase->createTransaction(id, new WebIDBDatabaseCallbacksImpl(call
backs), objectStoreIds, mode); | 74 m_webIDBDatabase->createTransaction(id, new WebIDBDatabaseCallbacksImpl(call
backs), objectStoreIds, mode); |
| 75 } | 75 } |
| 76 | 76 |
| 77 void IDBDatabaseBackendProxy::commit(int64_t transactionId) | 77 void IDBDatabaseBackendProxy::commit(int64_t transactionId) |
| 78 { | 78 { |
| 79 m_webIDBDatabase->commit(transactionId); | 79 m_webIDBDatabase->commit(transactionId); |
| 80 } | 80 } |
| 81 | 81 |
| 82 void IDBDatabaseBackendProxy::abort(int64_t transactionId) | 82 void IDBDatabaseBackendProxy::abort(int64_t transactionId) |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 142 if (m_webIDBDatabase) | 142 if (m_webIDBDatabase) |
| 143 m_webIDBDatabase->createIndex(transactionId, objectStoreId, indexId, nam
e, keyPath, unique, multiEntry); | 143 m_webIDBDatabase->createIndex(transactionId, objectStoreId, indexId, nam
e, keyPath, unique, multiEntry); |
| 144 } | 144 } |
| 145 | 145 |
| 146 void IDBDatabaseBackendProxy::deleteIndex(int64_t transactionId, int64_t objectS
toreId, int64_t indexId) | 146 void IDBDatabaseBackendProxy::deleteIndex(int64_t transactionId, int64_t objectS
toreId, int64_t indexId) |
| 147 { | 147 { |
| 148 if (m_webIDBDatabase) | 148 if (m_webIDBDatabase) |
| 149 m_webIDBDatabase->deleteIndex(transactionId, objectStoreId, indexId); | 149 m_webIDBDatabase->deleteIndex(transactionId, objectStoreId, indexId); |
| 150 } | 150 } |
| 151 | 151 |
| 152 void IDBDatabaseBackendProxy::close(PassRefPtr<IDBDatabaseCallbacks>) | 152 void IDBDatabaseBackendProxy::close(IDBDatabaseCallbacks*) |
| 153 { | 153 { |
| 154 m_webIDBDatabase->close(); | 154 m_webIDBDatabase->close(); |
| 155 } | 155 } |
| 156 | 156 |
| 157 } // namespace WebKit | 157 } // namespace WebKit |
| OLD | NEW |