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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 class ScriptExecutionContext; | 46 class ScriptExecutionContext; |
47 | 47 |
48 typedef int ExceptionCode; | 48 typedef int ExceptionCode; |
49 | 49 |
50 class IDBDatabase : public RefCounted<IDBDatabase>, public ScriptWrappable, publ
ic EventTarget, public ActiveDOMObject { | 50 class IDBDatabase : public RefCounted<IDBDatabase>, public ScriptWrappable, publ
ic EventTarget, public ActiveDOMObject { |
51 public: | 51 public: |
52 static PassRefPtr<IDBDatabase> create(ScriptExecutionContext*, PassRefPtr<ID
BDatabaseBackendInterface>, PassRefPtr<IDBDatabaseCallbacks>); | 52 static PassRefPtr<IDBDatabase> create(ScriptExecutionContext*, PassRefPtr<ID
BDatabaseBackendInterface>, PassRefPtr<IDBDatabaseCallbacks>); |
53 ~IDBDatabase(); | 53 ~IDBDatabase(); |
54 | 54 |
55 void setMetadata(const IDBDatabaseMetadata& metadata) { m_metadata = metadat
a; } | 55 void setMetadata(const IDBDatabaseMetadata& metadata) { m_metadata = metadat
a; } |
| 56 void indexCreated(int64_t objectStoreId, const IDBIndexMetadata&); |
| 57 void indexDeleted(int64_t objectStoreId, int64_t indexId); |
56 void transactionCreated(IDBTransaction*); | 58 void transactionCreated(IDBTransaction*); |
57 void transactionFinished(IDBTransaction*); | 59 void transactionFinished(IDBTransaction*); |
58 | 60 |
59 // Implement the IDL | 61 // Implement the IDL |
60 const String name() const { return m_metadata.name; } | 62 const String name() const { return m_metadata.name; } |
61 PassRefPtr<IDBAny> version() const; | 63 PassRefPtr<IDBAny> version() const; |
62 PassRefPtr<DOMStringList> objectStoreNames() const; | 64 PassRefPtr<DOMStringList> objectStoreNames() const; |
63 | 65 |
64 PassRefPtr<IDBObjectStore> createObjectStore(const String& name, const Dicti
onary&, ExceptionCode&); | 66 PassRefPtr<IDBObjectStore> createObjectStore(const String& name, const Dicti
onary&, ExceptionCode&); |
65 PassRefPtr<IDBObjectStore> createObjectStore(const String& name, const IDBKe
yPath&, bool autoIncrement, ExceptionCode&); | 67 PassRefPtr<IDBObjectStore> createObjectStore(const String& name, const IDBKe
yPath&, bool autoIncrement, ExceptionCode&); |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
132 // Keep track of the versionchange events waiting to be fired on this | 134 // Keep track of the versionchange events waiting to be fired on this |
133 // database so that we can cancel them if the database closes. | 135 // database so that we can cancel them if the database closes. |
134 Vector<RefPtr<Event> > m_enqueuedEvents; | 136 Vector<RefPtr<Event> > m_enqueuedEvents; |
135 | 137 |
136 RefPtr<IDBDatabaseCallbacks> m_databaseCallbacks; | 138 RefPtr<IDBDatabaseCallbacks> m_databaseCallbacks; |
137 }; | 139 }; |
138 | 140 |
139 } // namespace WebCore | 141 } // namespace WebCore |
140 | 142 |
141 #endif // IDBDatabase_h | 143 #endif // IDBDatabase_h |
OLD | NEW |