From e7fd1980c7fbe92aea58b6d7256770d7be9ac621 Mon Sep 17 00:00:00 2001 From: "jorlow@chromium.org" Date: Fri, 17 Sep 2010 11:27:26 +0000 Subject: Add IDBIndex plumbing (for IndexedDB). BUG=none TEST=none Review URL: http://codereview.chromium.org/3442001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@59780 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/common/render_messages_params.h | 36 +++++++++++++++++++++++++++++++++- 1 file changed, 35 insertions(+), 1 deletion(-) (limited to 'chrome/common/render_messages_params.h') diff --git a/chrome/common/render_messages_params.h b/chrome/common/render_messages_params.h index aaa5bb0..4847695 100644 --- a/chrome/common/render_messages_params.h +++ b/chrome/common/render_messages_params.h @@ -652,6 +652,27 @@ struct ViewHostMsg_IDBDatabaseCreateObjectStore_Params { int32 idb_database_id_; }; +// Used to open both cursors and object cursors in IndexedDB. +struct ViewHostMsg_IDBIndexOpenCursor_Params { + // The response should have this id. + int32 response_id_; + + // The serialized left key. + IndexedDBKey left_key_; + + // The serialized right key. + IndexedDBKey right_key_; + + // The key flags. + int32 key_flags_; + + // The direction of this cursor. + int32 direction_; + + // The index the index belongs to. + int32 idb_index_id_; +}; + // Used to create an index. struct ViewHostMsg_IDBObjectStoreCreateIndex_Params { ViewHostMsg_IDBObjectStoreCreateIndex_Params(); @@ -680,15 +701,20 @@ struct ViewHostMsg_IDBObjectStoreOpenCursor_Params { // The response should have this id. int32 response_id_; + // The serialized left key. IndexedDBKey left_key_; + // The serialized right key. IndexedDBKey right_key_; + // The key flags. int32 flags_; + // The direction of this cursor. int32 direction_; - // The object store the index belongs to. + + // The object store the cursor belongs to. int32 idb_object_store_id_; }; @@ -1121,6 +1147,14 @@ struct ParamTraits { }; template <> +struct ParamTraits { + typedef ViewHostMsg_IDBIndexOpenCursor_Params param_type; + static void Write(Message* m, const param_type& p); + static bool Read(const Message* m, void** iter, param_type* p); + static void Log(const param_type& p, std::string* l); +}; + +template <> struct ParamTraits { typedef ViewHostMsg_IDBObjectStoreCreateIndex_Params param_type; static void Write(Message* m, const param_type& p); -- cgit v1.1