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

Side by Side Diff: content/common/indexed_db/proxy_webidbindex_impl.cc

Issue 10204003: Use WebIDBKeyPath type in WebKit API, implement IndexedDBKeyPath type. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Formatting nit. Created 8 years, 8 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 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/common/indexed_db/proxy_webidbindex_impl.h" 5 #include "content/common/indexed_db/proxy_webidbindex_impl.h"
6 6
7 #include "content/common/indexed_db/indexed_db_dispatcher.h" 7 #include "content/common/indexed_db/indexed_db_dispatcher.h"
8 #include "content/common/indexed_db/indexed_db_messages.h" 8 #include "content/common/indexed_db/indexed_db_messages.h"
9 #include "content/common/indexed_db/proxy_webidbtransaction_impl.h" 9 #include "content/common/indexed_db/proxy_webidbtransaction_impl.h"
10 #include "content/common/child_thread.h" 10 #include "content/common/child_thread.h"
11 #include "third_party/WebKit/Source/WebKit/chromium/public/WebIDBKeyPath.h"
11 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebString.h" 12 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebString.h"
12 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebVector.h" 13 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebVector.h"
13 14
14 using WebKit::WebExceptionCode; 15 using WebKit::WebExceptionCode;
15 using WebKit::WebDOMStringList; 16 using WebKit::WebDOMStringList;
17 using WebKit::WebIDBKeyPath;
16 using WebKit::WebString; 18 using WebKit::WebString;
17 using WebKit::WebVector; 19 using WebKit::WebVector;
18 20
19 RendererWebIDBIndexImpl::RendererWebIDBIndexImpl(int32 idb_index_id) 21 RendererWebIDBIndexImpl::RendererWebIDBIndexImpl(int32 idb_index_id)
20 : idb_index_id_(idb_index_id) { 22 : idb_index_id_(idb_index_id) {
21 } 23 }
22 24
23 RendererWebIDBIndexImpl::~RendererWebIDBIndexImpl() { 25 RendererWebIDBIndexImpl::~RendererWebIDBIndexImpl() {
24 // It's not possible for there to be pending callbacks that address this 26 // It's not possible for there to be pending callbacks that address this
25 // object since inside WebKit, they hold a reference to the object wich owns 27 // object since inside WebKit, they hold a reference to the object wich owns
(...skipping 10 matching lines...) Expand all
36 return result; 38 return result;
37 } 39 }
38 40
39 WebString RendererWebIDBIndexImpl::storeName() const { 41 WebString RendererWebIDBIndexImpl::storeName() const {
40 string16 result; 42 string16 result;
41 IndexedDBDispatcher::Send( 43 IndexedDBDispatcher::Send(
42 new IndexedDBHostMsg_IndexStoreName(idb_index_id_, &result)); 44 new IndexedDBHostMsg_IndexStoreName(idb_index_id_, &result));
43 return result; 45 return result;
44 } 46 }
45 47
46 WebString RendererWebIDBIndexImpl::keyPathString() const { 48 WebIDBKeyPath RendererWebIDBIndexImpl::keyPath() const {
47 NullableString16 result; 49 IndexedDBKeyPath result;
48 IndexedDBDispatcher::Send( 50 IndexedDBDispatcher::Send(
49 new IndexedDBHostMsg_IndexKeyPath(idb_index_id_, &result)); 51 new IndexedDBHostMsg_IndexKeyPath(idb_index_id_, &result));
50 return result; 52 return result;
51 } 53 }
52 54
53 bool RendererWebIDBIndexImpl::unique() const { 55 bool RendererWebIDBIndexImpl::unique() const {
54 bool result; 56 bool result;
55 IndexedDBDispatcher::Send( 57 IndexedDBDispatcher::Send(
56 new IndexedDBHostMsg_IndexUnique(idb_index_id_, &result)); 58 new IndexedDBHostMsg_IndexUnique(idb_index_id_, &result));
57 return result; 59 return result;
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 void RendererWebIDBIndexImpl::getKey( 137 void RendererWebIDBIndexImpl::getKey(
136 const WebKit::WebIDBKeyRange& key_range, 138 const WebKit::WebIDBKeyRange& key_range,
137 WebKit::WebIDBCallbacks* callbacks, 139 WebKit::WebIDBCallbacks* callbacks,
138 const WebKit::WebIDBTransaction& transaction, 140 const WebKit::WebIDBTransaction& transaction,
139 WebExceptionCode& ec) { 141 WebExceptionCode& ec) {
140 IndexedDBDispatcher* dispatcher = 142 IndexedDBDispatcher* dispatcher =
141 IndexedDBDispatcher::ThreadSpecificInstance(); 143 IndexedDBDispatcher::ThreadSpecificInstance();
142 dispatcher->RequestIDBIndexGetKeyByRange( 144 dispatcher->RequestIDBIndexGetKeyByRange(
143 IndexedDBKeyRange(key_range), callbacks, idb_index_id_, transaction, &ec); 145 IndexedDBKeyRange(key_range), callbacks, idb_index_id_, transaction, &ec);
144 } 146 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698