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

Side by Side Diff: content/renderer/renderer_webidbindex_impl.cc

Issue 8747002: Dispatch IndexedDB IPC messages to worker threads (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: remove some includes Created 9 years 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 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/renderer/renderer_webidbindex_impl.h" 5 #include "content/renderer/renderer_webidbindex_impl.h"
6 6
7 #include "content/common/indexed_db_messages.h" 7 #include "content/common/indexed_db_messages.h"
8 #include "content/renderer/indexed_db_dispatcher.h" 8 #include "content/renderer/indexed_db_dispatcher.h"
9 #include "content/renderer/render_thread_impl.h" 9 #include "content/renderer/render_thread_impl.h"
10 #include "content/renderer/renderer_webidbtransaction_impl.h" 10 #include "content/renderer/renderer_webidbtransaction_impl.h"
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 new IndexedDBHostMsg_IndexUnique(idb_index_id_, &result)); 56 new IndexedDBHostMsg_IndexUnique(idb_index_id_, &result));
57 return result; 57 return result;
58 } 58 }
59 59
60 void RendererWebIDBIndexImpl::openObjectCursor( 60 void RendererWebIDBIndexImpl::openObjectCursor(
61 const WebKit::WebIDBKeyRange& range, 61 const WebKit::WebIDBKeyRange& range,
62 unsigned short direction, 62 unsigned short direction,
63 WebKit::WebIDBCallbacks* callbacks, 63 WebKit::WebIDBCallbacks* callbacks,
64 const WebKit::WebIDBTransaction& transaction, 64 const WebKit::WebIDBTransaction& transaction,
65 WebExceptionCode& ec) { 65 WebExceptionCode& ec) {
66 IndexedDBDispatcher* dispatcher = 66 IndexedDBDispatcher* dispatcher = IndexedDBDispatcher::Instance();
67 RenderThreadImpl::current()->indexed_db_dispatcher();
68 dispatcher->RequestIDBIndexOpenObjectCursor( 67 dispatcher->RequestIDBIndexOpenObjectCursor(
69 range, direction, callbacks, idb_index_id_, transaction, &ec); 68 range, direction, callbacks, idb_index_id_, transaction, &ec);
70 } 69 }
71 70
72 void RendererWebIDBIndexImpl::openKeyCursor( 71 void RendererWebIDBIndexImpl::openKeyCursor(
73 const WebKit::WebIDBKeyRange& range, 72 const WebKit::WebIDBKeyRange& range,
74 unsigned short direction, 73 unsigned short direction,
75 WebKit::WebIDBCallbacks* callbacks, 74 WebKit::WebIDBCallbacks* callbacks,
76 const WebKit::WebIDBTransaction& transaction, 75 const WebKit::WebIDBTransaction& transaction,
77 WebExceptionCode& ec) { 76 WebExceptionCode& ec) {
78 IndexedDBDispatcher* dispatcher = 77 IndexedDBDispatcher* dispatcher = IndexedDBDispatcher::Instance();
79 RenderThreadImpl::current()->indexed_db_dispatcher();
80 dispatcher->RequestIDBIndexOpenKeyCursor( 78 dispatcher->RequestIDBIndexOpenKeyCursor(
81 range, direction, callbacks, idb_index_id_, transaction, &ec); 79 range, direction, callbacks, idb_index_id_, transaction, &ec);
82 } 80 }
83 81
84 void RendererWebIDBIndexImpl::getObject( 82 void RendererWebIDBIndexImpl::getObject(
85 const WebKit::WebIDBKey& key, 83 const WebKit::WebIDBKey& key,
86 WebKit::WebIDBCallbacks* callbacks, 84 WebKit::WebIDBCallbacks* callbacks,
87 const WebKit::WebIDBTransaction& transaction, 85 const WebKit::WebIDBTransaction& transaction,
88 WebExceptionCode& ec) { 86 WebExceptionCode& ec) {
89 IndexedDBDispatcher* dispatcher = 87 IndexedDBDispatcher* dispatcher = IndexedDBDispatcher::Instance();
90 RenderThreadImpl::current()->indexed_db_dispatcher();
91 dispatcher->RequestIDBIndexGetObject( 88 dispatcher->RequestIDBIndexGetObject(
92 IndexedDBKey(key), callbacks, idb_index_id_, transaction, &ec); 89 IndexedDBKey(key), callbacks, idb_index_id_, transaction, &ec);
93 } 90 }
94 91
95 void RendererWebIDBIndexImpl::getKey( 92 void RendererWebIDBIndexImpl::getKey(
96 const WebKit::WebIDBKey& key, 93 const WebKit::WebIDBKey& key,
97 WebKit::WebIDBCallbacks* callbacks, 94 WebKit::WebIDBCallbacks* callbacks,
98 const WebKit::WebIDBTransaction& transaction, 95 const WebKit::WebIDBTransaction& transaction,
99 WebExceptionCode& ec) { 96 WebExceptionCode& ec) {
100 IndexedDBDispatcher* dispatcher = 97 IndexedDBDispatcher* dispatcher = IndexedDBDispatcher::Instance();
101 RenderThreadImpl::current()->indexed_db_dispatcher();
102 dispatcher->RequestIDBIndexGetKey( 98 dispatcher->RequestIDBIndexGetKey(
103 IndexedDBKey(key), callbacks, idb_index_id_, transaction, &ec); 99 IndexedDBKey(key), callbacks, idb_index_id_, transaction, &ec);
104 } 100 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698