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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 class IDBObjectStore : public ScriptWrappable, public RefCounted<IDBObjectStore>
{ | 50 class IDBObjectStore : public ScriptWrappable, public RefCounted<IDBObjectStore>
{ |
51 public: | 51 public: |
52 static PassRefPtr<IDBObjectStore> create(const IDBObjectStoreMetadata& metad
ata, IDBTransaction* transaction) | 52 static PassRefPtr<IDBObjectStore> create(const IDBObjectStoreMetadata& metad
ata, IDBTransaction* transaction) |
53 { | 53 { |
54 return adoptRef(new IDBObjectStore(metadata, transaction)); | 54 return adoptRef(new IDBObjectStore(metadata, transaction)); |
55 } | 55 } |
56 ~IDBObjectStore() { } | 56 ~IDBObjectStore() { } |
57 | 57 |
58 // Implement the IDBObjectStore IDL | 58 // Implement the IDBObjectStore IDL |
59 int64_t id() const { return m_metadata.id; } | 59 int64_t id() const { return m_metadata.id; } |
60 const String name() const { return m_metadata.name; } | 60 const String& name() const { return m_metadata.name; } |
61 PassRefPtr<IDBAny> keyPathAny() const { return IDBAny::create(m_metadata.key
Path); } | 61 PassRefPtr<IDBAny> keyPathAny() const { return IDBAny::create(m_metadata.key
Path); } |
62 const IDBKeyPath keyPath() const { return m_metadata.keyPath; } | 62 const IDBKeyPath& keyPath() const { return m_metadata.keyPath; } |
63 PassRefPtr<DOMStringList> indexNames() const; | 63 PassRefPtr<DOMStringList> indexNames() const; |
64 PassRefPtr<IDBTransaction> transaction() const { return m_transaction; } | 64 PassRefPtr<IDBTransaction> transaction() const { return m_transaction; } |
65 bool autoIncrement() const { return m_metadata.autoIncrement; } | 65 bool autoIncrement() const { return m_metadata.autoIncrement; } |
66 | 66 |
67 PassRefPtr<IDBRequest> openCursor(ScriptExecutionContext* context, PassRefPt
r<IDBKeyRange> range, const String& direction, ExceptionState& es) { return open
Cursor(context, range, direction, IDBDatabaseBackendInterface::NormalTask, es);
} | 67 PassRefPtr<IDBRequest> openCursor(ScriptExecutionContext* context, PassRefPt
r<IDBKeyRange> range, const String& direction, ExceptionState& es) { return open
Cursor(context, range, direction, IDBDatabaseBackendInterface::NormalTask, es);
} |
68 PassRefPtr<IDBRequest> openCursor(ScriptExecutionContext*, const ScriptValue
& key, const String& direction, ExceptionState&); | 68 PassRefPtr<IDBRequest> openCursor(ScriptExecutionContext*, const ScriptValue
& key, const String& direction, ExceptionState&); |
69 PassRefPtr<IDBRequest> get(ScriptExecutionContext*, const ScriptValue& key,
ExceptionState&); | 69 PassRefPtr<IDBRequest> get(ScriptExecutionContext*, const ScriptValue& key,
ExceptionState&); |
70 PassRefPtr<IDBRequest> get(ScriptExecutionContext*, PassRefPtr<IDBKeyRange>,
ExceptionState&); | 70 PassRefPtr<IDBRequest> get(ScriptExecutionContext*, PassRefPtr<IDBKeyRange>,
ExceptionState&); |
71 PassRefPtr<IDBRequest> add(ScriptState*, ScriptValue&, const ScriptValue& ke
y, ExceptionState&); | 71 PassRefPtr<IDBRequest> add(ScriptState*, ScriptValue&, const ScriptValue& ke
y, ExceptionState&); |
72 PassRefPtr<IDBRequest> put(ScriptState*, ScriptValue&, const ScriptValue& ke
y, ExceptionState&); | 72 PassRefPtr<IDBRequest> put(ScriptState*, ScriptValue&, const ScriptValue& ke
y, ExceptionState&); |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
115 RefPtr<IDBTransaction> m_transaction; | 115 RefPtr<IDBTransaction> m_transaction; |
116 bool m_deleted; | 116 bool m_deleted; |
117 | 117 |
118 typedef HashMap<String, RefPtr<IDBIndex> > IDBIndexMap; | 118 typedef HashMap<String, RefPtr<IDBIndex> > IDBIndexMap; |
119 IDBIndexMap m_indexMap; | 119 IDBIndexMap m_indexMap; |
120 }; | 120 }; |
121 | 121 |
122 } // namespace WebCore | 122 } // namespace WebCore |
123 | 123 |
124 #endif // IDBObjectStore_h | 124 #endif // IDBObjectStore_h |
OLD | NEW |