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 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 virtual bool hasPendingActivity() const OVERRIDE; | 91 virtual bool hasPendingActivity() const OVERRIDE; |
92 virtual void stop() OVERRIDE; | 92 virtual void stop() OVERRIDE; |
93 | 93 |
94 // EventTarget | 94 // EventTarget |
95 virtual const AtomicString& interfaceName() const OVERRIDE; | 95 virtual const AtomicString& interfaceName() const OVERRIDE; |
96 virtual ExecutionContext* executionContext() const OVERRIDE; | 96 virtual ExecutionContext* executionContext() const OVERRIDE; |
97 | 97 |
98 bool isClosePending() const { return m_closePending; } | 98 bool isClosePending() const { return m_closePending; } |
99 void forceClose(); | 99 void forceClose(); |
100 const IDBDatabaseMetadata& metadata() const { return m_metadata; } | 100 const IDBDatabaseMetadata& metadata() const { return m_metadata; } |
101 void enqueueEvent(PassRefPtr<Event>); | 101 void enqueueEvent(PassRefPtrWillBeRawPtr<Event>); |
102 | 102 |
103 using EventTarget::dispatchEvent; | 103 using EventTarget::dispatchEvent; |
104 virtual bool dispatchEvent(PassRefPtr<Event>) OVERRIDE; | 104 virtual bool dispatchEvent(PassRefPtrWillBeRawPtr<Event>) OVERRIDE; |
105 | 105 |
106 int64_t findObjectStoreId(const String& name) const; | 106 int64_t findObjectStoreId(const String& name) const; |
107 bool containsObjectStore(const String& name) const | 107 bool containsObjectStore(const String& name) const |
108 { | 108 { |
109 return findObjectStoreId(name) != IDBObjectStoreMetadata::InvalidId; | 109 return findObjectStoreId(name) != IDBObjectStoreMetadata::InvalidId; |
110 } | 110 } |
111 | 111 |
112 blink::WebIDBDatabase* backend() const { return m_backend.get(); } | 112 blink::WebIDBDatabase* backend() const { return m_backend.get(); } |
113 | 113 |
114 static int64_t nextTransactionId(); | 114 static int64_t nextTransactionId(); |
(...skipping 22 matching lines...) Expand all Loading... |
137 OwnPtr<blink::WebIDBDatabase> m_backend; | 137 OwnPtr<blink::WebIDBDatabase> m_backend; |
138 RefPtr<IDBTransaction> m_versionChangeTransaction; | 138 RefPtr<IDBTransaction> m_versionChangeTransaction; |
139 typedef HashMap<int64_t, RefPtr<IDBTransaction> > TransactionMap; | 139 typedef HashMap<int64_t, RefPtr<IDBTransaction> > TransactionMap; |
140 TransactionMap m_transactions; | 140 TransactionMap m_transactions; |
141 | 141 |
142 bool m_closePending; | 142 bool m_closePending; |
143 bool m_contextStopped; | 143 bool m_contextStopped; |
144 | 144 |
145 // Keep track of the versionchange events waiting to be fired on this | 145 // Keep track of the versionchange events waiting to be fired on this |
146 // database so that we can cancel them if the database closes. | 146 // database so that we can cancel them if the database closes. |
147 Vector<RefPtr<Event> > m_enqueuedEvents; | 147 WillBePersistentHeapVector<RefPtrWillBeMember<Event> > m_enqueuedEvents; |
148 | 148 |
149 RefPtr<IDBDatabaseCallbacks> m_databaseCallbacks; | 149 RefPtr<IDBDatabaseCallbacks> m_databaseCallbacks; |
150 }; | 150 }; |
151 | 151 |
152 } // namespace WebCore | 152 } // namespace WebCore |
153 | 153 |
154 #endif // IDBDatabase_h | 154 #endif // IDBDatabase_h |
OLD | NEW |