OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2010 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * | 7 * |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 28 matching lines...) Expand all Loading... |
39 #include "modules/EventModules.h" | 39 #include "modules/EventModules.h" |
40 #include "modules/ModulesExport.h" | 40 #include "modules/ModulesExport.h" |
41 #include "modules/indexeddb/IDBAny.h" | 41 #include "modules/indexeddb/IDBAny.h" |
42 #include "modules/indexeddb/IDBTransaction.h" | 42 #include "modules/indexeddb/IDBTransaction.h" |
43 #include "modules/indexeddb/IndexedDB.h" | 43 #include "modules/indexeddb/IndexedDB.h" |
44 #include "platform/blob/BlobData.h" | 44 #include "platform/blob/BlobData.h" |
45 #include "platform/heap/Handle.h" | 45 #include "platform/heap/Handle.h" |
46 #include "public/platform/WebBlobInfo.h" | 46 #include "public/platform/WebBlobInfo.h" |
47 #include "public/platform/modules/indexeddb/WebIDBCursor.h" | 47 #include "public/platform/modules/indexeddb/WebIDBCursor.h" |
48 #include "public/platform/modules/indexeddb/WebIDBTypes.h" | 48 #include "public/platform/modules/indexeddb/WebIDBTypes.h" |
| 49 #include <memory> |
49 | 50 |
50 namespace blink { | 51 namespace blink { |
51 | 52 |
52 class DOMException; | 53 class DOMException; |
53 class ExceptionState; | 54 class ExceptionState; |
54 class IDBCursor; | 55 class IDBCursor; |
55 struct IDBDatabaseMetadata; | 56 struct IDBDatabaseMetadata; |
56 class IDBValue; | 57 class IDBValue; |
57 | 58 |
58 class MODULES_EXPORT IDBRequest | 59 class MODULES_EXPORT IDBRequest |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
90 | 91 |
91 DEFINE_ATTRIBUTE_EVENT_LISTENER(success); | 92 DEFINE_ATTRIBUTE_EVENT_LISTENER(success); |
92 DEFINE_ATTRIBUTE_EVENT_LISTENER(error); | 93 DEFINE_ATTRIBUTE_EVENT_LISTENER(error); |
93 | 94 |
94 void setCursorDetails(IndexedDB::CursorType, WebIDBCursorDirection); | 95 void setCursorDetails(IndexedDB::CursorType, WebIDBCursorDirection); |
95 void setPendingCursor(IDBCursor*); | 96 void setPendingCursor(IDBCursor*); |
96 void abort(); | 97 void abort(); |
97 | 98 |
98 virtual void onError(DOMException*); | 99 virtual void onError(DOMException*); |
99 virtual void onSuccess(const Vector<String>&); | 100 virtual void onSuccess(const Vector<String>&); |
100 virtual void onSuccess(PassOwnPtr<WebIDBCursor>, IDBKey*, IDBKey* primaryKey
, PassRefPtr<IDBValue>); | 101 virtual void onSuccess(std::unique_ptr<WebIDBCursor>, IDBKey*, IDBKey* prima
ryKey, PassRefPtr<IDBValue>); |
101 virtual void onSuccess(IDBKey*); | 102 virtual void onSuccess(IDBKey*); |
102 virtual void onSuccess(PassRefPtr<IDBValue>); | 103 virtual void onSuccess(PassRefPtr<IDBValue>); |
103 virtual void onSuccess(const Vector<RefPtr<IDBValue>>&); | 104 virtual void onSuccess(const Vector<RefPtr<IDBValue>>&); |
104 virtual void onSuccess(int64_t); | 105 virtual void onSuccess(int64_t); |
105 virtual void onSuccess(); | 106 virtual void onSuccess(); |
106 virtual void onSuccess(IDBKey*, IDBKey* primaryKey, PassRefPtr<IDBValue>); | 107 virtual void onSuccess(IDBKey*, IDBKey* primaryKey, PassRefPtr<IDBValue>); |
107 | 108 |
108 // Only IDBOpenDBRequest instances should receive these: | 109 // Only IDBOpenDBRequest instances should receive these: |
109 virtual void onBlocked(int64_t oldVersion) { ASSERT_NOT_REACHED(); } | 110 virtual void onBlocked(int64_t oldVersion) { ASSERT_NOT_REACHED(); } |
110 virtual void onUpgradeNeeded(int64_t oldVersion, PassOwnPtr<WebIDBDatabase>,
const IDBDatabaseMetadata&, WebIDBDataLoss, String dataLossMessage) { ASSERT_NO
T_REACHED(); } | 111 virtual void onUpgradeNeeded(int64_t oldVersion, std::unique_ptr<WebIDBDatab
ase>, const IDBDatabaseMetadata&, WebIDBDataLoss, String dataLossMessage) { ASSE
RT_NOT_REACHED(); } |
111 virtual void onSuccess(PassOwnPtr<WebIDBDatabase>, const IDBDatabaseMetadata
&) { ASSERT_NOT_REACHED(); } | 112 virtual void onSuccess(std::unique_ptr<WebIDBDatabase>, const IDBDatabaseMet
adata&) { ASSERT_NOT_REACHED(); } |
112 | 113 |
113 // ActiveScriptWrappable | 114 // ActiveScriptWrappable |
114 bool hasPendingActivity() const final; | 115 bool hasPendingActivity() const final; |
115 | 116 |
116 // ActiveDOMObject | 117 // ActiveDOMObject |
117 void stop() final; | 118 void stop() final; |
118 | 119 |
119 // EventTarget | 120 // EventTarget |
120 const AtomicString& interfaceName() const override; | 121 const AtomicString& interfaceName() const override; |
121 ExecutionContext* getExecutionContext() const final; | 122 ExecutionContext* getExecutionContext() const final; |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
168 RefPtr<IDBValue> m_cursorValue; | 169 RefPtr<IDBValue> m_cursorValue; |
169 | 170 |
170 bool m_didFireUpgradeNeededEvent = false; | 171 bool m_didFireUpgradeNeededEvent = false; |
171 bool m_preventPropagation = false; | 172 bool m_preventPropagation = false; |
172 bool m_resultDirty = true; | 173 bool m_resultDirty = true; |
173 }; | 174 }; |
174 | 175 |
175 } // namespace blink | 176 } // namespace blink |
176 | 177 |
177 #endif // IDBRequest_h | 178 #endif // IDBRequest_h |
OLD | NEW |