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

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

Issue 22893058: IndexedDB: Replace IDL operation overloading with ScriptValue handling (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Remove assert, per review feedback Created 7 years, 3 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
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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 52
53 // Implement the IDL 53 // Implement the IDL
54 const String& name() const { return m_metadata.name; } 54 const String& name() const { return m_metadata.name; }
55 PassRefPtr<IDBObjectStore> objectStore() const { return m_objectStore; } 55 PassRefPtr<IDBObjectStore> objectStore() const { return m_objectStore; }
56 PassRefPtr<IDBAny> keyPathAny() const { return IDBAny::create(m_metadata.key Path); } 56 PassRefPtr<IDBAny> keyPathAny() const { return IDBAny::create(m_metadata.key Path); }
57 const IDBKeyPath& keyPath() const { return m_metadata.keyPath; } 57 const IDBKeyPath& keyPath() const { return m_metadata.keyPath; }
58 bool unique() const { return m_metadata.unique; } 58 bool unique() const { return m_metadata.unique; }
59 bool multiEntry() const { return m_metadata.multiEntry; } 59 bool multiEntry() const { return m_metadata.multiEntry; }
60 int64_t id() const { return m_metadata.id; } 60 int64_t id() const { return m_metadata.id; }
61 61
62 PassRefPtr<IDBRequest> openCursor(ScriptExecutionContext*, PassRefPtr<IDBKey Range>, const String& direction, ExceptionState&);
63 PassRefPtr<IDBRequest> openCursor(ScriptExecutionContext*, const ScriptValue & key, const String& direction, ExceptionState&); 62 PassRefPtr<IDBRequest> openCursor(ScriptExecutionContext*, const ScriptValue & key, const String& direction, ExceptionState&);
64 PassRefPtr<IDBRequest> count(ScriptExecutionContext*, PassRefPtr<IDBKeyRange >, ExceptionState&); 63 PassRefPtr<IDBRequest> openKeyCursor(ScriptExecutionContext*, const ScriptVa lue& range, const String& direction, ExceptionState&);
65 PassRefPtr<IDBRequest> count(ScriptExecutionContext*, const ScriptValue& key , ExceptionState&); 64 PassRefPtr<IDBRequest> count(ScriptExecutionContext*, const ScriptValue& ran ge, ExceptionState&);
66 PassRefPtr<IDBRequest> openKeyCursor(ScriptExecutionContext*, PassRefPtr<IDB KeyRange>, const String& direction, ExceptionState&);
67 PassRefPtr<IDBRequest> openKeyCursor(ScriptExecutionContext*, const ScriptVa lue& key, const String& direction, ExceptionState&);
68 PassRefPtr<IDBRequest> get(ScriptExecutionContext*, PassRefPtr<IDBKeyRange>, ExceptionState&);
69 PassRefPtr<IDBRequest> get(ScriptExecutionContext*, const ScriptValue& key, ExceptionState&); 65 PassRefPtr<IDBRequest> get(ScriptExecutionContext*, const ScriptValue& key, ExceptionState&);
70 PassRefPtr<IDBRequest> getKey(ScriptExecutionContext*, PassRefPtr<IDBKeyRang e>, ExceptionState&);
71 PassRefPtr<IDBRequest> getKey(ScriptExecutionContext*, const ScriptValue& ke y, ExceptionState&); 66 PassRefPtr<IDBRequest> getKey(ScriptExecutionContext*, const ScriptValue& ke y, ExceptionState&);
72 67
73 void markDeleted() { m_deleted = true; } 68 void markDeleted() { m_deleted = true; }
74 bool isDeleted() const; 69 bool isDeleted() const;
75 70
71 // Used internally and by InspectorIndexedDBAgent:
72 PassRefPtr<IDBRequest> openCursor(ScriptExecutionContext*, PassRefPtr<IDBKey Range>, IndexedDB::CursorDirection);
73
76 IDBDatabaseBackendInterface* backendDB() const; 74 IDBDatabaseBackendInterface* backendDB() const;
77 75
78 private: 76 private:
79 IDBIndex(const IDBIndexMetadata&, IDBObjectStore*, IDBTransaction*); 77 IDBIndex(const IDBIndexMetadata&, IDBObjectStore*, IDBTransaction*);
80 78
81 IDBIndexMetadata m_metadata; 79 IDBIndexMetadata m_metadata;
82 RefPtr<IDBObjectStore> m_objectStore; 80 RefPtr<IDBObjectStore> m_objectStore;
83 RefPtr<IDBTransaction> m_transaction; 81 RefPtr<IDBTransaction> m_transaction;
84 bool m_deleted; 82 bool m_deleted;
85 }; 83 };
86 84
87 } // namespace WebCore 85 } // namespace WebCore
88 86
89 #endif // IDBIndex_h 87 #endif // IDBIndex_h
OLDNEW
« no previous file with comments | « Source/core/inspector/InspectorIndexedDBAgent.cpp ('k') | Source/modules/indexeddb/IDBIndex.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698