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

Unified Diff: chrome/common/render_messages.h

Issue 2740003: Implement IDBDatabase::createObjectStore. Also refactor IndexedDBCallbacks. (Closed)
Patch Set: Make sure indexed_db_context.cc is in the gypi file. Created 10 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/chrome_renderer.gypi ('k') | chrome/common/render_messages_internal.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/render_messages.h
diff --git a/chrome/common/render_messages.h b/chrome/common/render_messages.h
index f5e4d724ca266b729bd72f1090466b64293a442c..b85e3dcae1a499592b8e3aaa602257bf5075bb53 100644
--- a/chrome/common/render_messages.h
+++ b/chrome/common/render_messages.h
@@ -543,6 +543,24 @@ struct ViewHostMsg_IndexedDatabaseOpen_Params {
string16 description_;
};
+// Used to create an object store.
+struct ViewHostMsg_IDBDatabaseCreateObjectStore_Params {
+ // The response should have this id.
+ int32 response_id_;
+
+ // The name of the object store.
+ string16 name_;
+
+ // The keyPath of the object store.
+ string16 keypath_;
+
+ // Whether the object store created should have a key generator.
+ bool auto_increment_;
+
+ // The database the object store belongs to.
+ int32 idb_database_id_;
+};
+
// Allows an extension to execute code in a tab.
struct ViewMsg_ExecuteCode_Params {
ViewMsg_ExecuteCode_Params() {}
@@ -2355,6 +2373,40 @@ struct ParamTraits<ViewHostMsg_IndexedDatabaseOpen_Params> {
}
};
+// Traits for ViewHostMsg_IDBDatabaseCreateObjectStore_Params.
+template <>
+struct ParamTraits<ViewHostMsg_IDBDatabaseCreateObjectStore_Params> {
+ typedef ViewHostMsg_IDBDatabaseCreateObjectStore_Params param_type;
+ static void Write(Message* m, const param_type& p) {
+ WriteParam(m, p.response_id_);
+ WriteParam(m, p.name_);
+ WriteParam(m, p.keypath_);
+ WriteParam(m, p.auto_increment_);
+ WriteParam(m, p.idb_database_id_);
+ }
+ static bool Read(const Message* m, void** iter, param_type* p) {
+ return
+ ReadParam(m, iter, &p->response_id_) &&
+ ReadParam(m, iter, &p->name_) &&
+ ReadParam(m, iter, &p->keypath_) &&
+ ReadParam(m, iter, &p->auto_increment_) &&
+ ReadParam(m, iter, &p->idb_database_id_);
+ }
+ static void Log(const param_type& p, std::wstring* l) {
+ l->append(L"(");
+ LogParam(p.response_id_, l);
+ l->append(L", ");
+ LogParam(p.name_, l);
+ l->append(L", ");
+ LogParam(p.keypath_, l);
+ l->append(L", ");
+ LogParam(p.auto_increment_, l);
+ l->append(L", ");
+ LogParam(p.idb_database_id_, l);
+ l->append(L")");
+ }
+};
+
// Traits for ViewHostMsg_CreateWorker_Params
template <>
struct ParamTraits<ViewHostMsg_CreateWorker_Params> {
« no previous file with comments | « chrome/chrome_renderer.gypi ('k') | chrome/common/render_messages_internal.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698