summaryrefslogtreecommitdiff
path: root/chromium/third_party/blink/renderer/modules/indexeddb/idb_factory.h
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/third_party/blink/renderer/modules/indexeddb/idb_factory.h')
-rw-r--r--chromium/third_party/blink/renderer/modules/indexeddb/idb_factory.h20
1 files changed, 15 insertions, 5 deletions
diff --git a/chromium/third_party/blink/renderer/modules/indexeddb/idb_factory.h b/chromium/third_party/blink/renderer/modules/indexeddb/idb_factory.h
index bc541748cff..68b8234455c 100644
--- a/chromium/third_party/blink/renderer/modules/indexeddb/idb_factory.h
+++ b/chromium/third_party/blink/renderer/modules/indexeddb/idb_factory.h
@@ -25,11 +25,14 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+
#ifndef THIRD_PARTY_BLINK_RENDERER_MODULES_INDEXEDDB_IDB_FACTORY_H_
#define THIRD_PARTY_BLINK_RENDERER_MODULES_INDEXEDDB_IDB_FACTORY_H_
-#include "third_party/blink/public/platform/modules/indexeddb/web_idb_factory.h"
+#include "third_party/blink/renderer/bindings/core/v8/script_promise.h"
#include "third_party/blink/renderer/modules/indexeddb/idb_open_db_request.h"
+#include "third_party/blink/renderer/modules/indexeddb/web_idb_factory.h"
+#include "third_party/blink/renderer/modules/modules_export.h"
#include "third_party/blink/renderer/platform/bindings/script_wrappable.h"
#include "third_party/blink/renderer/platform/heap/handle.h"
#include "third_party/blink/renderer/platform/wtf/text/wtf_string.h"
@@ -39,11 +42,18 @@ namespace blink {
class ExceptionState;
class ScriptState;
-class IDBFactory final : public ScriptWrappable {
+class MODULES_EXPORT IDBFactory final : public ScriptWrappable {
DEFINE_WRAPPERTYPEINFO();
public:
- static IDBFactory* Create() { return new IDBFactory(); }
+ static IDBFactory* Create() { return MakeGarbageCollected<IDBFactory>(); }
+ static IDBFactory* CreateForTest(
+ std::unique_ptr<WebIDBFactory> web_idb_factory) {
+ return MakeGarbageCollected<IDBFactory>(std::move(web_idb_factory));
+ }
+
+ IDBFactory();
+ IDBFactory(std::unique_ptr<WebIDBFactory>);
// Implement the IDBFactory IDL
IDBOpenDBRequest* open(ScriptState*, const String& name, ExceptionState&);
@@ -65,9 +75,9 @@ class IDBFactory final : public ScriptWrappable {
const String& name,
ExceptionState&);
- private:
- IDBFactory();
+ ScriptPromise GetDatabaseInfo(ScriptState*, ExceptionState&);
+ private:
WebIDBFactory* GetFactory();
IDBOpenDBRequest* OpenInternal(ScriptState*,