Index: third_party/WebKit/Source/modules/indexeddb/ResponseHandler.h |
diff --git a/third_party/WebKit/Source/modules/indexeddb/ResponseHandler.h b/third_party/WebKit/Source/modules/indexeddb/ResponseHandler.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..d65a5f346b21602f8c34c69ccfb200333282ae25 |
--- /dev/null |
+++ b/third_party/WebKit/Source/modules/indexeddb/ResponseHandler.h |
@@ -0,0 +1,34 @@ |
+// Copyright 2016 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef ResponseHandler_h |
+#define ResponseHandler_h |
+ |
+#include "platform/mojo/MojoHelper.h" |
+#include "public/platform/modules/indexeddb/indexed_db.mojom-blink.h" |
+#include "wtf/RefPtr.h" |
+ |
+namespace blink { |
+ |
+class IDBRequest; |
+ |
+class ResponseHandler final : public RefCounted<ResponseHandler> { |
+ WTF_MAKE_NONCOPYABLE(ResponseHandler); |
+ |
+public: |
+ static indexed_db::mojom::blink::Database::GetCallback createGetCallback(IDBRequest*); |
+ static indexed_db::mojom::blink::DatabaseFactory::OpenCallback createOpenCallback(IDBRequest*); |
+ |
+private: |
+ explicit ResponseHandler(IDBRequest*); |
+ |
+ void onGet(indexed_db::mojom::blink::GetResultPtr); |
+ void onOpen(indexed_db::mojom::blink::OpenResultPtr); |
+ |
+ Persistent<IDBRequest> m_request; |
+}; |
+ |
+} // namespace blink |
+ |
+#endif // ResponseHandler_h |