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 // Used internally and by InspectorIndexedDBAgent: | 91 // Used internally and by InspectorIndexedDBAgent: |
92 IDBRequest* openCursor(ScriptState*, IDBKeyRange*, WebIDBCursorDirection, We
bIDBTaskType = WebIDBTaskTypeNormal); | 92 IDBRequest* openCursor(ScriptState*, IDBKeyRange*, WebIDBCursorDirection, We
bIDBTaskType = WebIDBTaskTypeNormal); |
93 | 93 |
94 void markDeleted() { m_deleted = true; } | 94 void markDeleted() { m_deleted = true; } |
95 bool isDeleted() const { return m_deleted; } | 95 bool isDeleted() const { return m_deleted; } |
96 void transactionFinished(); | 96 void transactionFinished(); |
97 | 97 |
98 const IDBObjectStoreMetadata& metadata() const { return m_metadata; } | 98 const IDBObjectStoreMetadata& metadata() const { return m_metadata; } |
99 void setMetadata(const IDBObjectStoreMetadata& metadata) { m_metadata = meta
data; } | 99 void setMetadata(const IDBObjectStoreMetadata& metadata) { m_metadata = meta
data; } |
100 | 100 |
101 typedef HeapVector<Member<IDBKey> > IndexKeys; | 101 typedef HeapVector<Member<IDBKey>> IndexKeys; |
102 | 102 |
103 WebIDBDatabase* backendDB() const; | 103 WebIDBDatabase* backendDB() const; |
104 | 104 |
105 private: | 105 private: |
106 IDBObjectStore(const IDBObjectStoreMetadata&, IDBTransaction*); | 106 IDBObjectStore(const IDBObjectStoreMetadata&, IDBTransaction*); |
107 | 107 |
108 IDBIndex* createIndex(ScriptState*, const String& name, const IDBKeyPath&, c
onst IDBIndexParameters&, ExceptionState&); | 108 IDBIndex* createIndex(ScriptState*, const String& name, const IDBKeyPath&, c
onst IDBIndexParameters&, ExceptionState&); |
109 IDBRequest* put(ScriptState*, WebIDBPutMode, IDBAny* source, const ScriptVal
ue&, const ScriptValue& key, ExceptionState&); | 109 IDBRequest* put(ScriptState*, WebIDBPutMode, IDBAny* source, const ScriptVal
ue&, const ScriptValue& key, ExceptionState&); |
110 | 110 |
111 int64_t findIndexId(const String& name) const; | 111 int64_t findIndexId(const String& name) const; |
112 bool containsIndex(const String& name) const | 112 bool containsIndex(const String& name) const |
113 { | 113 { |
114 return findIndexId(name) != IDBIndexMetadata::InvalidId; | 114 return findIndexId(name) != IDBIndexMetadata::InvalidId; |
115 } | 115 } |
116 | 116 |
117 IDBObjectStoreMetadata m_metadata; | 117 IDBObjectStoreMetadata m_metadata; |
118 Member<IDBTransaction> m_transaction; | 118 Member<IDBTransaction> m_transaction; |
119 bool m_deleted; | 119 bool m_deleted; |
120 | 120 |
121 typedef HeapHashMap<String, Member<IDBIndex> > IDBIndexMap; | 121 typedef HeapHashMap<String, Member<IDBIndex>> IDBIndexMap; |
122 IDBIndexMap m_indexMap; | 122 IDBIndexMap m_indexMap; |
123 }; | 123 }; |
124 | 124 |
125 } // namespace blink | 125 } // namespace blink |
126 | 126 |
127 #endif // IDBObjectStore_h | 127 #endif // IDBObjectStore_h |
OLD | NEW |