Index: third_party/WebKit/Source/modules/indexeddb/IDBRequest.h |
diff --git a/third_party/WebKit/Source/modules/indexeddb/IDBRequest.h b/third_party/WebKit/Source/modules/indexeddb/IDBRequest.h |
index 112f0b05b1aca5bd3e614fe060397aedf708e349..b9c723f4fe8d47d37bc37397561187ab0eecd2bf 100644 |
--- a/third_party/WebKit/Source/modules/indexeddb/IDBRequest.h |
+++ b/third_party/WebKit/Source/modules/indexeddb/IDBRequest.h |
@@ -29,6 +29,7 @@ |
#ifndef IDBRequest_h |
#define IDBRequest_h |
+#include "Source/modules/indexeddb/indexed_db.mojom-blink.h" |
#include "bindings/core/v8/ActiveScriptWrappable.h" |
#include "bindings/core/v8/ScriptState.h" |
#include "bindings/core/v8/ScriptValue.h" |
@@ -44,8 +45,6 @@ |
#include "platform/blob/BlobData.h" |
#include "platform/heap/Handle.h" |
#include "public/platform/WebBlobInfo.h" |
-#include "public/platform/modules/indexeddb/WebIDBCursor.h" |
-#include "public/platform/modules/indexeddb/WebIDBTypes.h" |
#include <memory> |
namespace blink { |
@@ -53,7 +52,9 @@ namespace blink { |
class DOMException; |
class ExceptionState; |
class IDBCursor; |
+class IDBCursorProxy; |
struct IDBDatabaseMetadata; |
+class IDBDatabaseProxy; |
class IDBValue; |
class MODULES_EXPORT IDBRequest |
@@ -92,13 +93,13 @@ public: |
DEFINE_ATTRIBUTE_EVENT_LISTENER(success); |
DEFINE_ATTRIBUTE_EVENT_LISTENER(error); |
- void setCursorDetails(IndexedDB::CursorType, WebIDBCursorDirection); |
+ void setCursorDetails(IndexedDB::CursorType, indexed_db::mojom::blink::CursorDirection); |
void setPendingCursor(IDBCursor*); |
void abort(); |
virtual void onError(DOMException*); |
virtual void onSuccess(const Vector<String>&); |
- virtual void onSuccess(std::unique_ptr<WebIDBCursor>, IDBKey*, IDBKey* primaryKey, PassRefPtr<IDBValue>); |
+ virtual void onSuccess(std::unique_ptr<IDBCursorProxy>, IDBKey*, IDBKey* primaryKey, PassRefPtr<IDBValue>); |
virtual void onSuccess(IDBKey*); |
virtual void onSuccess(PassRefPtr<IDBValue>); |
virtual void onSuccess(const Vector<RefPtr<IDBValue>>&); |
@@ -106,10 +107,8 @@ public: |
virtual void onSuccess(); |
virtual void onSuccess(IDBKey*, IDBKey* primaryKey, PassRefPtr<IDBValue>); |
- // Only IDBOpenDBRequest instances should receive these: |
- virtual void onBlocked(int64_t oldVersion) { ASSERT_NOT_REACHED(); } |
- virtual void onUpgradeNeeded(int64_t oldVersion, std::unique_ptr<WebIDBDatabase>, const IDBDatabaseMetadata&, WebIDBDataLoss, String dataLossMessage) { ASSERT_NOT_REACHED(); } |
- virtual void onSuccess(std::unique_ptr<WebIDBDatabase>, const IDBDatabaseMetadata&) { ASSERT_NOT_REACHED(); } |
+ // Only IDBOpenDBRequest instances should receive this: |
+ virtual void onSuccess(std::unique_ptr<IDBDatabaseProxy>, const IDBDatabaseMetadata&) { NOTREACHED(); } |
// ActiveScriptWrappable |
bool hasPendingActivity() const final; |
@@ -127,6 +126,8 @@ public: |
// the upcoming "success" or "error"). |
void transactionDidFinishAndDispatch(); |
+ void onGetResult(indexed_db::mojom::blink::GetResultPtr); |
+ |
IDBCursor* getResultCursor() const; |
protected: |
@@ -160,7 +161,7 @@ private: |
// Only used if the result type will be a cursor. |
IndexedDB::CursorType m_cursorType = IndexedDB::CursorKeyAndValue; |
- WebIDBCursorDirection m_cursorDirection = WebIDBCursorDirectionNext; |
+ indexed_db::mojom::blink::CursorDirection m_cursorDirection = indexed_db::mojom::blink::CursorDirection::Next; |
// When a cursor is continued/advanced, m_result is cleared and m_pendingCursor holds it. |
Member<IDBCursor> m_pendingCursor; |
// New state is not applied to the cursor object until the event is dispatched. |