| 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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 | 62 |
| 63 protected: | 63 protected: |
| 64 virtual ~IDBRequestBase() { } | 64 virtual ~IDBRequestBase() { } |
| 65 }; | 65 }; |
| 66 #endif | 66 #endif |
| 67 | 67 |
| 68 class IDBRequest : public IDBRequestBase, public ScriptWrappable, public EventTa
rgetWithInlineData, public ActiveDOMObject { | 68 class IDBRequest : public IDBRequestBase, public ScriptWrappable, public EventTa
rgetWithInlineData, public ActiveDOMObject { |
| 69 DEFINE_EVENT_TARGET_REFCOUNTING(IDBRequestBase); | 69 DEFINE_EVENT_TARGET_REFCOUNTING(IDBRequestBase); |
| 70 | 70 |
| 71 public: | 71 public: |
| 72 static PassRefPtrWillBeRawPtr<IDBRequest> create(ExecutionContext*, PassRefP
trWillBeRawPtr<IDBAny> source, IDBTransaction*); | 72 static PassRefPtrWillBeRawPtr<IDBRequest> create(ScriptState*, PassRefPtrWil
lBeRawPtr<IDBAny> source, IDBTransaction*); |
| 73 virtual ~IDBRequest(); | 73 virtual ~IDBRequest(); |
| 74 virtual void trace(Visitor*); | 74 virtual void trace(Visitor*); |
| 75 | 75 |
| 76 ScriptValue result(ExceptionState&); | 76 ScriptValue result(ExceptionState&); |
| 77 PassRefPtrWillBeRawPtr<DOMError> error(ExceptionState&) const; | 77 PassRefPtrWillBeRawPtr<DOMError> error(ExceptionState&) const; |
| 78 ScriptValue source() const; | 78 ScriptValue source() const; |
| 79 IDBTransaction* transaction() const { return m_transaction.get(); } | 79 IDBTransaction* transaction() const { return m_transaction.get(); } |
| 80 | 80 |
| 81 bool isResultDirty() const { return m_resultDirty; } | 81 bool isResultDirty() const { return m_resultDirty; } |
| 82 PassRefPtrWillBeRawPtr<IDBAny> resultAsAny() const { return m_result; } | 82 PassRefPtrWillBeRawPtr<IDBAny> resultAsAny() const { return m_result; } |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 139 if (derefBase()) | 139 if (derefBase()) |
| 140 delete this; | 140 delete this; |
| 141 else if (hasOneRef()) | 141 else if (hasOneRef()) |
| 142 checkForReferenceCycle(); | 142 checkForReferenceCycle(); |
| 143 } | 143 } |
| 144 #endif | 144 #endif |
| 145 | 145 |
| 146 IDBCursor* getResultCursor() const; | 146 IDBCursor* getResultCursor() const; |
| 147 | 147 |
| 148 protected: | 148 protected: |
| 149 IDBRequest(ExecutionContext*, PassRefPtrWillBeRawPtr<IDBAny> source, IDBTran
saction*); | 149 IDBRequest(ScriptState*, PassRefPtrWillBeRawPtr<IDBAny> source, IDBTransacti
on*); |
| 150 void enqueueEvent(PassRefPtrWillBeRawPtr<Event>); | 150 void enqueueEvent(PassRefPtrWillBeRawPtr<Event>); |
| 151 void dequeueEvent(Event*); | 151 void dequeueEvent(Event*); |
| 152 virtual bool shouldEnqueueEvent() const; | 152 virtual bool shouldEnqueueEvent() const; |
| 153 void onSuccessInternal(PassRefPtrWillBeRawPtr<IDBAny>); | 153 void onSuccessInternal(PassRefPtrWillBeRawPtr<IDBAny>); |
| 154 void setResult(PassRefPtrWillBeRawPtr<IDBAny>); | 154 void setResult(PassRefPtrWillBeRawPtr<IDBAny>); |
| 155 | 155 |
| 156 bool m_contextStopped; | 156 bool m_contextStopped; |
| 157 RefPtrWillBeMember<IDBTransaction> m_transaction; | 157 RefPtrWillBeMember<IDBTransaction> m_transaction; |
| 158 ReadyState m_readyState; | 158 ReadyState m_readyState; |
| 159 bool m_requestAborted; // May be aborted by transaction then receive async o
nsuccess; ignore vs. assert. | 159 bool m_requestAborted; // May be aborted by transaction then receive async o
nsuccess; ignore vs. assert. |
| (...skipping 25 matching lines...) Expand all Loading... |
| 185 OwnPtr<Vector<blink::WebBlobInfo> > m_blobInfo; | 185 OwnPtr<Vector<blink::WebBlobInfo> > m_blobInfo; |
| 186 | 186 |
| 187 bool m_didFireUpgradeNeededEvent; | 187 bool m_didFireUpgradeNeededEvent; |
| 188 bool m_preventPropagation; | 188 bool m_preventPropagation; |
| 189 bool m_resultDirty; | 189 bool m_resultDirty; |
| 190 }; | 190 }; |
| 191 | 191 |
| 192 } // namespace WebCore | 192 } // namespace WebCore |
| 193 | 193 |
| 194 #endif // IDBRequest_h | 194 #endif // IDBRequest_h |
| OLD | NEW |