| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. | 2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. |
| 3 * Copyright (C) 2009, 2011 Google Inc. All Rights Reserved. | 3 * Copyright (C) 2009, 2011 Google Inc. All Rights Reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 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 11 matching lines...) Expand all Loading... |
| 22 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 22 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 24 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 24 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 25 * | 25 * |
| 26 */ | 26 */ |
| 27 | 27 |
| 28 #include "modules/indexeddb/WorkerGlobalScopeIndexedDatabase.h" | 28 #include "modules/indexeddb/WorkerGlobalScopeIndexedDatabase.h" |
| 29 | 29 |
| 30 #include "core/dom/ExecutionContext.h" | 30 #include "core/dom/ExecutionContext.h" |
| 31 #include "modules/indexeddb/IDBFactory.h" | 31 #include "modules/indexeddb/IDBFactory.h" |
| 32 #include "modules/indexeddb/IndexedDBClient.h" | |
| 33 | 32 |
| 34 namespace blink { | 33 namespace blink { |
| 35 | 34 |
| 36 WorkerGlobalScopeIndexedDatabase::WorkerGlobalScopeIndexedDatabase() | 35 WorkerGlobalScopeIndexedDatabase::WorkerGlobalScopeIndexedDatabase() |
| 37 { | 36 { |
| 38 } | 37 } |
| 39 | 38 |
| 40 WorkerGlobalScopeIndexedDatabase::~WorkerGlobalScopeIndexedDatabase() | 39 WorkerGlobalScopeIndexedDatabase::~WorkerGlobalScopeIndexedDatabase() |
| 41 { | 40 { |
| 42 } | 41 } |
| (...skipping 14 matching lines...) Expand all Loading... |
| 57 } | 56 } |
| 58 | 57 |
| 59 IDBFactory* WorkerGlobalScopeIndexedDatabase::indexedDB(Supplementable<WorkerGlo
balScope>& context) | 58 IDBFactory* WorkerGlobalScopeIndexedDatabase::indexedDB(Supplementable<WorkerGlo
balScope>& context) |
| 60 { | 59 { |
| 61 return from(context).indexedDB(); | 60 return from(context).indexedDB(); |
| 62 } | 61 } |
| 63 | 62 |
| 64 IDBFactory* WorkerGlobalScopeIndexedDatabase::indexedDB() | 63 IDBFactory* WorkerGlobalScopeIndexedDatabase::indexedDB() |
| 65 { | 64 { |
| 66 if (!m_idbFactory) | 65 if (!m_idbFactory) |
| 67 m_idbFactory = IDBFactory::create(IndexedDBClient::create()); | 66 m_idbFactory = IDBFactory::create(); |
| 68 return m_idbFactory.get(); | 67 return m_idbFactory.get(); |
| 69 } | 68 } |
| 70 | 69 |
| 71 DEFINE_TRACE(WorkerGlobalScopeIndexedDatabase) | 70 DEFINE_TRACE(WorkerGlobalScopeIndexedDatabase) |
| 72 { | 71 { |
| 73 visitor->trace(m_idbFactory); | 72 visitor->trace(m_idbFactory); |
| 74 Supplement<WorkerGlobalScope>::trace(visitor); | 73 Supplement<WorkerGlobalScope>::trace(visitor); |
| 75 } | 74 } |
| 76 | 75 |
| 77 } // namespace blink | 76 } // namespace blink |
| OLD | NEW |