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 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
111 | 111 |
112 // ActiveDOMObject | 112 // ActiveDOMObject |
113 bool hasPendingActivity() const final; | 113 bool hasPendingActivity() const final; |
114 void stop() final; | 114 void stop() final; |
115 | 115 |
116 // EventTarget | 116 // EventTarget |
117 const AtomicString& interfaceName() const override; | 117 const AtomicString& interfaceName() const override; |
118 ExecutionContext* executionContext() const final; | 118 ExecutionContext* executionContext() const final; |
119 void uncaughtExceptionInEventHandler() final; | 119 void uncaughtExceptionInEventHandler() final; |
120 | 120 |
121 using EventTarget::dispatchEvent; | |
122 bool dispatchEvent(PassRefPtrWillBeRawPtr<Event>) override; | |
123 | |
124 // Called by a version change transaction that has finished to set this | 121 // Called by a version change transaction that has finished to set this |
125 // request back from DONE (following "upgradeneeded") back to PENDING (for | 122 // request back from DONE (following "upgradeneeded") back to PENDING (for |
126 // the upcoming "success" or "error"). | 123 // the upcoming "success" or "error"). |
127 void transactionDidFinishAndDispatch(); | 124 void transactionDidFinishAndDispatch(); |
128 | 125 |
129 IDBCursor* getResultCursor() const; | 126 IDBCursor* getResultCursor() const; |
130 | 127 |
131 protected: | 128 protected: |
132 IDBRequest(ScriptState*, IDBAny* source, IDBTransaction*); | 129 IDBRequest(ScriptState*, IDBAny* source, IDBTransaction*); |
133 void enqueueEvent(PassRefPtrWillBeRawPtr<Event>); | 130 void enqueueEvent(PassRefPtrWillBeRawPtr<Event>); |
134 void dequeueEvent(Event*); | 131 void dequeueEvent(Event*); |
135 virtual bool shouldEnqueueEvent() const; | 132 virtual bool shouldEnqueueEvent() const; |
136 void onSuccessInternal(IDBAny*); | 133 void onSuccessInternal(IDBAny*); |
137 void setResult(IDBAny*); | 134 void setResult(IDBAny*); |
138 | 135 |
| 136 bool dispatchEventInternal(PassRefPtrWillBeRawPtr<Event>) override; |
| 137 |
139 bool m_contextStopped; | 138 bool m_contextStopped; |
140 Member<IDBTransaction> m_transaction; | 139 Member<IDBTransaction> m_transaction; |
141 ReadyState m_readyState; | 140 ReadyState m_readyState; |
142 bool m_requestAborted; // May be aborted by transaction then receive async o
nsuccess; ignore vs. assert. | 141 bool m_requestAborted; // May be aborted by transaction then receive async o
nsuccess; ignore vs. assert. |
143 | 142 |
144 private: | 143 private: |
145 void setResultCursor(IDBCursor*, IDBKey*, IDBKey* primaryKey, PassRefPtr<IDB
Value>); | 144 void setResultCursor(IDBCursor*, IDBKey*, IDBKey* primaryKey, PassRefPtr<IDB
Value>); |
146 void ackReceivedBlobs(const IDBValue*); | 145 void ackReceivedBlobs(const IDBValue*); |
147 void ackReceivedBlobs(const Vector<RefPtr<IDBValue>>&); | 146 void ackReceivedBlobs(const Vector<RefPtr<IDBValue>>&); |
148 | 147 |
(...skipping 16 matching lines...) Expand all Loading... |
165 RefPtr<IDBValue> m_cursorValue; | 164 RefPtr<IDBValue> m_cursorValue; |
166 | 165 |
167 bool m_didFireUpgradeNeededEvent; | 166 bool m_didFireUpgradeNeededEvent; |
168 bool m_preventPropagation; | 167 bool m_preventPropagation; |
169 bool m_resultDirty; | 168 bool m_resultDirty; |
170 }; | 169 }; |
171 | 170 |
172 } // namespace blink | 171 } // namespace blink |
173 | 172 |
174 #endif // IDBRequest_h | 173 #endif // IDBRequest_h |
OLD | NEW |