| OLD | NEW |
| (Empty) |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #include "content/common_child/indexed_db/proxy_webidbfactory_impl.h" | |
| 6 | |
| 7 #include "content/common/child_thread.h" | |
| 8 #include "content/common_child/indexed_db/indexed_db_dispatcher.h" | |
| 9 #include "third_party/WebKit/public/platform/WebString.h" | |
| 10 | |
| 11 using WebKit::WebIDBCallbacks; | |
| 12 using WebKit::WebIDBDatabase; | |
| 13 using WebKit::WebIDBDatabaseCallbacks; | |
| 14 using WebKit::WebString; | |
| 15 | |
| 16 namespace content { | |
| 17 | |
| 18 RendererWebIDBFactoryImpl::RendererWebIDBFactoryImpl() { | |
| 19 } | |
| 20 | |
| 21 RendererWebIDBFactoryImpl::~RendererWebIDBFactoryImpl() { | |
| 22 } | |
| 23 | |
| 24 void RendererWebIDBFactoryImpl::getDatabaseNames( | |
| 25 WebIDBCallbacks* callbacks, | |
| 26 const WebString& database_identifier, | |
| 27 const WebString& data_dir_unused) { | |
| 28 IndexedDBDispatcher* dispatcher = | |
| 29 IndexedDBDispatcher::ThreadSpecificInstance(); | |
| 30 dispatcher->RequestIDBFactoryGetDatabaseNames( | |
| 31 callbacks, database_identifier); | |
| 32 } | |
| 33 | |
| 34 void RendererWebIDBFactoryImpl::open( | |
| 35 const WebString& name, | |
| 36 long long version, | |
| 37 long long transaction_id, | |
| 38 WebIDBCallbacks* callbacks, | |
| 39 WebIDBDatabaseCallbacks* database_callbacks, | |
| 40 const WebString& database_identifier, | |
| 41 const WebString& data_dir) { | |
| 42 // Don't send the data_dir. We know what we want on the Browser side of | |
| 43 // things. | |
| 44 IndexedDBDispatcher* dispatcher = | |
| 45 IndexedDBDispatcher::ThreadSpecificInstance(); | |
| 46 dispatcher->RequestIDBFactoryOpen( | |
| 47 name, version, transaction_id, callbacks, database_callbacks, | |
| 48 database_identifier); | |
| 49 } | |
| 50 | |
| 51 void RendererWebIDBFactoryImpl::deleteDatabase( | |
| 52 const WebString& name, | |
| 53 WebIDBCallbacks* callbacks, | |
| 54 const WebString& database_identifier, | |
| 55 const WebString& data_dir) { | |
| 56 // Don't send the data_dir. We know what we want on the Browser side of | |
| 57 // things. | |
| 58 IndexedDBDispatcher* dispatcher = | |
| 59 IndexedDBDispatcher::ThreadSpecificInstance(); | |
| 60 dispatcher->RequestIDBFactoryDeleteDatabase( | |
| 61 name, callbacks, database_identifier); | |
| 62 } | |
| 63 | |
| 64 } // namespace content | |
| OLD | NEW |