OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/child/indexed_db/proxy_webidbfactory_impl.h" | 5 #include "content/child/indexed_db/proxy_webidbfactory_impl.h" |
6 | 6 |
7 #include "content/child/thread_safe_sender.h" | 7 #include "content/child/thread_safe_sender.h" |
8 #include "content/child/indexed_db/indexed_db_dispatcher.h" | 8 #include "content/child/indexed_db/indexed_db_dispatcher.h" |
9 #include "third_party/WebKit/public/platform/WebCString.h" | 9 #include "third_party/WebKit/public/platform/WebCString.h" |
10 #include "third_party/WebKit/public/platform/WebString.h" | 10 #include "third_party/WebKit/public/platform/WebString.h" |
(...skipping 10 matching lines...) Expand all Loading... |
21 : thread_safe_sender_(thread_safe_sender) { | 21 : thread_safe_sender_(thread_safe_sender) { |
22 } | 22 } |
23 | 23 |
24 RendererWebIDBFactoryImpl::~RendererWebIDBFactoryImpl() { | 24 RendererWebIDBFactoryImpl::~RendererWebIDBFactoryImpl() { |
25 } | 25 } |
26 | 26 |
27 void RendererWebIDBFactoryImpl::getDatabaseNames( | 27 void RendererWebIDBFactoryImpl::getDatabaseNames( |
28 WebIDBCallbacks* callbacks, | 28 WebIDBCallbacks* callbacks, |
29 const WebString& database_identifier) { | 29 const WebString& database_identifier) { |
30 IndexedDBDispatcher* dispatcher = | 30 IndexedDBDispatcher* dispatcher = |
31 IndexedDBDispatcher::ThreadSpecificInstance(thread_safe_sender_); | 31 IndexedDBDispatcher::ThreadSpecificInstance(thread_safe_sender_.get()); |
32 dispatcher->RequestIDBFactoryGetDatabaseNames( | 32 dispatcher->RequestIDBFactoryGetDatabaseNames(callbacks, |
33 callbacks, database_identifier.utf8()); | 33 database_identifier.utf8()); |
34 } | 34 } |
35 | 35 |
36 void RendererWebIDBFactoryImpl::open( | 36 void RendererWebIDBFactoryImpl::open( |
37 const WebString& name, | 37 const WebString& name, |
38 long long version, | 38 long long version, |
39 long long transaction_id, | 39 long long transaction_id, |
40 WebIDBCallbacks* callbacks, | 40 WebIDBCallbacks* callbacks, |
41 WebIDBDatabaseCallbacks* database_callbacks, | 41 WebIDBDatabaseCallbacks* database_callbacks, |
42 const WebString& database_identifier) { | 42 const WebString& database_identifier) { |
43 IndexedDBDispatcher* dispatcher = | 43 IndexedDBDispatcher* dispatcher = |
44 IndexedDBDispatcher::ThreadSpecificInstance(thread_safe_sender_); | 44 IndexedDBDispatcher::ThreadSpecificInstance(thread_safe_sender_.get()); |
45 dispatcher->RequestIDBFactoryOpen( | 45 dispatcher->RequestIDBFactoryOpen(name, |
46 name, version, transaction_id, callbacks, database_callbacks, | 46 version, |
47 database_identifier.utf8()); | 47 transaction_id, |
| 48 callbacks, |
| 49 database_callbacks, |
| 50 database_identifier.utf8()); |
48 } | 51 } |
49 | 52 |
50 void RendererWebIDBFactoryImpl::deleteDatabase( | 53 void RendererWebIDBFactoryImpl::deleteDatabase( |
51 const WebString& name, | 54 const WebString& name, |
52 WebIDBCallbacks* callbacks, | 55 WebIDBCallbacks* callbacks, |
53 const WebString& database_identifier) { | 56 const WebString& database_identifier) { |
54 IndexedDBDispatcher* dispatcher = | 57 IndexedDBDispatcher* dispatcher = |
55 IndexedDBDispatcher::ThreadSpecificInstance(thread_safe_sender_); | 58 IndexedDBDispatcher::ThreadSpecificInstance(thread_safe_sender_.get()); |
56 dispatcher->RequestIDBFactoryDeleteDatabase( | 59 dispatcher->RequestIDBFactoryDeleteDatabase( |
57 name, callbacks, database_identifier.utf8()); | 60 name, callbacks, database_identifier.utf8()); |
58 } | 61 } |
59 | 62 |
60 } // namespace content | 63 } // namespace content |
OLD | NEW |