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 30 matching lines...) Expand all Loading... |
41 | 41 |
42 WorkerGlobalScopeIndexedDatabase::~WorkerGlobalScopeIndexedDatabase() | 42 WorkerGlobalScopeIndexedDatabase::~WorkerGlobalScopeIndexedDatabase() |
43 { | 43 { |
44 } | 44 } |
45 | 45 |
46 const char* WorkerGlobalScopeIndexedDatabase::supplementName() | 46 const char* WorkerGlobalScopeIndexedDatabase::supplementName() |
47 { | 47 { |
48 return "WorkerGlobalScopeIndexedDatabase"; | 48 return "WorkerGlobalScopeIndexedDatabase"; |
49 } | 49 } |
50 | 50 |
51 WorkerGlobalScopeIndexedDatabase& WorkerGlobalScopeIndexedDatabase::from(WorkerS
upplementable& context) | 51 WorkerGlobalScopeIndexedDatabase& WorkerGlobalScopeIndexedDatabase::from(WillBeH
eapSupplementable<WorkerGlobalScope>& context) |
52 { | 52 { |
53 WorkerGlobalScopeIndexedDatabase* supplement = static_cast<WorkerGlobalScope
IndexedDatabase*>(WorkerSupplement::from(context, supplementName())); | 53 WorkerGlobalScopeIndexedDatabase* supplement = static_cast<WorkerGlobalScope
IndexedDatabase*>(WillBeHeapSupplement<WorkerGlobalScope>::from(context, supplem
entName())); |
54 if (!supplement) { | 54 if (!supplement) { |
55 supplement = new WorkerGlobalScopeIndexedDatabase(); | 55 supplement = new WorkerGlobalScopeIndexedDatabase(); |
56 provideTo(context, supplementName(), adoptPtr(supplement)); | 56 provideTo(context, supplementName(), adoptPtrWillBeNoop(supplement)); |
57 } | 57 } |
58 return *supplement; | 58 return *supplement; |
59 } | 59 } |
60 | 60 |
61 IDBFactory* WorkerGlobalScopeIndexedDatabase::indexedDB(WorkerSupplementable& co
ntext) | 61 IDBFactory* WorkerGlobalScopeIndexedDatabase::indexedDB(WillBeHeapSupplementable
<WorkerGlobalScope>& context) |
62 { | 62 { |
63 return from(context).indexedDB(); | 63 return from(context).indexedDB(); |
64 } | 64 } |
65 | 65 |
66 IDBFactory* WorkerGlobalScopeIndexedDatabase::indexedDB() | 66 IDBFactory* WorkerGlobalScopeIndexedDatabase::indexedDB() |
67 { | 67 { |
68 if (!m_factoryBackend) | 68 if (!m_factoryBackend) |
69 m_factoryBackend = IDBFactoryBackendInterface::create(); | 69 m_factoryBackend = IDBFactoryBackendInterface::create(); |
70 if (!m_idbFactory) | 70 if (!m_idbFactory) |
71 m_idbFactory = IDBFactory::create(m_factoryBackend.get()); | 71 m_idbFactory = IDBFactory::create(m_factoryBackend.get()); |
72 return m_idbFactory.get(); | 72 return m_idbFactory.get(); |
73 } | 73 } |
74 | 74 |
| 75 void WorkerGlobalScopeIndexedDatabase::trace(Visitor* visitor) |
| 76 { |
| 77 } |
| 78 |
75 } // namespace WebCore | 79 } // namespace WebCore |
OLD | NEW |