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

Unified Diff: content/renderer/renderer_webidbcursor_impl.cc

Issue 7834006: Consolidate key, primary key, value cursor messages. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 9 years, 2 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 | « content/renderer/renderer_webidbcursor_impl.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/renderer_webidbcursor_impl.cc
diff --git a/content/renderer/renderer_webidbcursor_impl.cc b/content/renderer/renderer_webidbcursor_impl.cc
index 4bf4ee16e1e9af313433ffb3510bf9952240a907..1837e2f103725233f8838c3ab3b64551bed0d4e2 100644
--- a/content/renderer/renderer_webidbcursor_impl.cc
+++ b/content/renderer/renderer_webidbcursor_impl.cc
@@ -13,8 +13,13 @@ using WebKit::WebIDBCallbacks;
using WebKit::WebIDBKey;
using WebKit::WebSerializedScriptValue;
-RendererWebIDBCursorImpl::RendererWebIDBCursorImpl(int32 idb_cursor_id)
- : idb_cursor_id_(idb_cursor_id) {
+RendererWebIDBCursorImpl::RendererWebIDBCursorImpl(int32 idb_cursor_id,
+ const IndexedDBKey& key, const IndexedDBKey& primary_key,
+ const SerializedScriptValue& value)
+ : idb_cursor_id_(idb_cursor_id),
+ key_(key),
+ primary_key_(primary_key),
+ value_(value) {
}
RendererWebIDBCursorImpl::~RendererWebIDBCursorImpl() {
@@ -34,24 +39,15 @@ unsigned short RendererWebIDBCursorImpl::direction() const {
}
WebIDBKey RendererWebIDBCursorImpl::key() const {
- IndexedDBKey key;
- RenderThreadImpl::current()->Send(
- new IndexedDBHostMsg_CursorKey(idb_cursor_id_, &key));
- return key;
+ return key_;
}
WebIDBKey RendererWebIDBCursorImpl::primaryKey() const {
- IndexedDBKey primaryKey;
- RenderThreadImpl::current()->Send(
- new IndexedDBHostMsg_CursorPrimaryKey(idb_cursor_id_, &primaryKey));
- return primaryKey;
+ return primary_key_;
}
WebSerializedScriptValue RendererWebIDBCursorImpl::value() const {
- SerializedScriptValue scriptValue;
- RenderThreadImpl::current()->Send(
- new IndexedDBHostMsg_CursorValue(idb_cursor_id_, &scriptValue));
- return scriptValue;
+ return value_;
}
void RendererWebIDBCursorImpl::update(const WebSerializedScriptValue& value,
« no previous file with comments | « content/renderer/renderer_webidbcursor_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698