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

Side by Side Diff: Source/modules/indexeddb/IDBIndex.h

Issue 14297012: IndexedDB: Use [Default] in IDLs to reduce overloads in implementations (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebased Created 7 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « Source/modules/indexeddb/IDBCursor.idl ('k') | Source/modules/indexeddb/IDBIndex.idl » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 51
52 // Implement the IDL 52 // Implement the IDL
53 const String name() const { return m_metadata.name; } 53 const String name() const { return m_metadata.name; }
54 PassRefPtr<IDBObjectStore> objectStore() const { return m_objectStore; } 54 PassRefPtr<IDBObjectStore> objectStore() const { return m_objectStore; }
55 PassRefPtr<IDBAny> keyPathAny() const { return IDBAny::create(m_metadata.key Path); } 55 PassRefPtr<IDBAny> keyPathAny() const { return IDBAny::create(m_metadata.key Path); }
56 const IDBKeyPath keyPath() const { return m_metadata.keyPath; } 56 const IDBKeyPath keyPath() const { return m_metadata.keyPath; }
57 bool unique() const { return m_metadata.unique; } 57 bool unique() const { return m_metadata.unique; }
58 bool multiEntry() const { return m_metadata.multiEntry; } 58 bool multiEntry() const { return m_metadata.multiEntry; }
59 int64_t id() const { return m_metadata.id; } 59 int64_t id() const { return m_metadata.id; }
60 60
61 // FIXME: Try to modify the code generator so this is unneeded.
62 PassRefPtr<IDBRequest> openCursor(ScriptExecutionContext* context, Exception Code& ec) { return openCursor(context, static_cast<IDBKeyRange*>(0), ec); }
63 PassRefPtr<IDBRequest> openCursor(ScriptExecutionContext* context, PassRefPt r<IDBKeyRange> keyRange, ExceptionCode& ec) { return openCursor(context, keyRang e, IDBCursor::directionNext(), ec); }
64 PassRefPtr<IDBRequest> openCursor(ScriptExecutionContext* context, const Scr iptValue& key, ExceptionCode& ec) { return openCursor(context, key, IDBCursor::d irectionNext(), ec); }
65 PassRefPtr<IDBRequest> openCursor(ScriptExecutionContext*, PassRefPtr<IDBKey Range>, const String& direction, ExceptionCode&); 61 PassRefPtr<IDBRequest> openCursor(ScriptExecutionContext*, PassRefPtr<IDBKey Range>, const String& direction, ExceptionCode&);
66 PassRefPtr<IDBRequest> openCursor(ScriptExecutionContext*, const ScriptValue & key, const String& direction, ExceptionCode&); 62 PassRefPtr<IDBRequest> openCursor(ScriptExecutionContext*, const ScriptValue & key, const String& direction, ExceptionCode&);
67 PassRefPtr<IDBRequest> count(ScriptExecutionContext* context, ExceptionCode& ec) { return count(context, static_cast<IDBKeyRange*>(0), ec); }
68 PassRefPtr<IDBRequest> count(ScriptExecutionContext*, PassRefPtr<IDBKeyRange >, ExceptionCode&); 63 PassRefPtr<IDBRequest> count(ScriptExecutionContext*, PassRefPtr<IDBKeyRange >, ExceptionCode&);
69 PassRefPtr<IDBRequest> count(ScriptExecutionContext*, const ScriptValue& key , ExceptionCode&); 64 PassRefPtr<IDBRequest> count(ScriptExecutionContext*, const ScriptValue& key , ExceptionCode&);
70
71 PassRefPtr<IDBRequest> openKeyCursor(ScriptExecutionContext* context, Except ionCode& ec) { return openKeyCursor(context, static_cast<IDBKeyRange*>(0), ec); }
72 PassRefPtr<IDBRequest> openKeyCursor(ScriptExecutionContext* context, PassRe fPtr<IDBKeyRange> keyRange, ExceptionCode& ec) { return openKeyCursor(context, k eyRange, IDBCursor::directionNext(), ec); }
73 PassRefPtr<IDBRequest> openKeyCursor(ScriptExecutionContext* context, const ScriptValue& key, ExceptionCode& ec) { return openKeyCursor(context, key, IDBCur sor::directionNext(), ec); }
74 PassRefPtr<IDBRequest> openKeyCursor(ScriptExecutionContext*, PassRefPtr<IDB KeyRange>, const String& direction, ExceptionCode&); 65 PassRefPtr<IDBRequest> openKeyCursor(ScriptExecutionContext*, PassRefPtr<IDB KeyRange>, const String& direction, ExceptionCode&);
75 PassRefPtr<IDBRequest> openKeyCursor(ScriptExecutionContext*, const ScriptVa lue& key, const String& direction, ExceptionCode&); 66 PassRefPtr<IDBRequest> openKeyCursor(ScriptExecutionContext*, const ScriptVa lue& key, const String& direction, ExceptionCode&);
76
77 PassRefPtr<IDBRequest> get(ScriptExecutionContext*, PassRefPtr<IDBKeyRange>, ExceptionCode&); 67 PassRefPtr<IDBRequest> get(ScriptExecutionContext*, PassRefPtr<IDBKeyRange>, ExceptionCode&);
78 PassRefPtr<IDBRequest> get(ScriptExecutionContext*, const ScriptValue& key, ExceptionCode&); 68 PassRefPtr<IDBRequest> get(ScriptExecutionContext*, const ScriptValue& key, ExceptionCode&);
79 PassRefPtr<IDBRequest> getKey(ScriptExecutionContext*, PassRefPtr<IDBKeyRang e>, ExceptionCode&); 69 PassRefPtr<IDBRequest> getKey(ScriptExecutionContext*, PassRefPtr<IDBKeyRang e>, ExceptionCode&);
80 PassRefPtr<IDBRequest> getKey(ScriptExecutionContext*, const ScriptValue& ke y, ExceptionCode&); 70 PassRefPtr<IDBRequest> getKey(ScriptExecutionContext*, const ScriptValue& ke y, ExceptionCode&);
81 71
82 void markDeleted() { m_deleted = true; } 72 void markDeleted() { m_deleted = true; }
83 73
84 IDBDatabaseBackendInterface* backendDB() const; 74 IDBDatabaseBackendInterface* backendDB() const;
85 75
86 private: 76 private:
87 IDBIndex(const IDBIndexMetadata&, IDBObjectStore*, IDBTransaction*); 77 IDBIndex(const IDBIndexMetadata&, IDBObjectStore*, IDBTransaction*);
88 78
89 IDBIndexMetadata m_metadata; 79 IDBIndexMetadata m_metadata;
90 RefPtr<IDBObjectStore> m_objectStore; 80 RefPtr<IDBObjectStore> m_objectStore;
91 RefPtr<IDBTransaction> m_transaction; 81 RefPtr<IDBTransaction> m_transaction;
92 bool m_deleted; 82 bool m_deleted;
93 }; 83 };
94 84
95 } // namespace WebCore 85 } // namespace WebCore
96 86
97 #endif // IDBIndex_h 87 #endif // IDBIndex_h
OLDNEW
« no previous file with comments | « Source/modules/indexeddb/IDBCursor.idl ('k') | Source/modules/indexeddb/IDBIndex.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698