Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(24)

Side by Side Diff: third_party/WebKit/Source/modules/indexeddb/IDBDatabase.h

Issue 2349413002: Minor IndexedDB refactorings. (Closed)
Patch Set: Rebased Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 void transactionCreated(IDBTransaction*); 71 void transactionCreated(IDBTransaction*);
72 void transactionFinished(const IDBTransaction*); 72 void transactionFinished(const IDBTransaction*);
73 const String& getObjectStoreName(int64_t objectStoreId) const; 73 const String& getObjectStoreName(int64_t objectStoreId) const;
74 74
75 // Implement the IDL 75 // Implement the IDL
76 const String& name() const { return m_metadata.name; } 76 const String& name() const { return m_metadata.name; }
77 unsigned long long version() const { return m_metadata.version; } 77 unsigned long long version() const { return m_metadata.version; }
78 DOMStringList* objectStoreNames() const; 78 DOMStringList* objectStoreNames() const;
79 79
80 IDBObjectStore* createObjectStore(const String& name, const IDBObjectStorePa rameters& options, ExceptionState& exceptionState) { return createObjectStore(na me, IDBKeyPath(options.keyPath()), options.autoIncrement(), exceptionState); } 80 IDBObjectStore* createObjectStore(const String& name, const IDBObjectStorePa rameters& options, ExceptionState& exceptionState) { return createObjectStore(na me, IDBKeyPath(options.keyPath()), options.autoIncrement(), exceptionState); }
81 IDBTransaction* transaction(ScriptState*, const StringOrStringSequenceOrDOMS tringList&, const String& mode, ExceptionState&); 81 IDBTransaction* transaction(ScriptState*, const StringOrStringSequenceOrDOMS tringList& storeNames, const String& mode, ExceptionState&);
82 void deleteObjectStore(const String& name, ExceptionState&); 82 void deleteObjectStore(const String& name, ExceptionState&);
83 void close(); 83 void close();
84 84
85 DEFINE_ATTRIBUTE_EVENT_LISTENER(abort); 85 DEFINE_ATTRIBUTE_EVENT_LISTENER(abort);
86 DEFINE_ATTRIBUTE_EVENT_LISTENER(close); 86 DEFINE_ATTRIBUTE_EVENT_LISTENER(close);
87 DEFINE_ATTRIBUTE_EVENT_LISTENER(error); 87 DEFINE_ATTRIBUTE_EVENT_LISTENER(error);
88 DEFINE_ATTRIBUTE_EVENT_LISTENER(versionchange); 88 DEFINE_ATTRIBUTE_EVENT_LISTENER(versionchange);
89 89
90 // IDBDatabaseCallbacks 90 // IDBDatabaseCallbacks
91 void onVersionChange(int64_t oldVersion, int64_t newVersion); 91 void onVersionChange(int64_t oldVersion, int64_t newVersion);
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 // Keep track of the versionchange events waiting to be fired on this 160 // Keep track of the versionchange events waiting to be fired on this
161 // database so that we can cancel them if the database closes. 161 // database so that we can cancel them if the database closes.
162 HeapVector<Member<Event>> m_enqueuedEvents; 162 HeapVector<Member<Event>> m_enqueuedEvents;
163 163
164 Member<IDBDatabaseCallbacks> m_databaseCallbacks; 164 Member<IDBDatabaseCallbacks> m_databaseCallbacks;
165 }; 165 };
166 166
167 } // namespace blink 167 } // namespace blink
168 168
169 #endif // IDBDatabase_h 169 #endif // IDBDatabase_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/modules/indexeddb/IDBCursor.cpp ('k') | third_party/WebKit/Source/modules/indexeddb/IDBDatabase.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698