| 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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 namespace WebCore { | 42 namespace WebCore { |
| 43 | 43 |
| 44 class DOMError; | 44 class DOMError; |
| 45 class ExceptionState; | 45 class ExceptionState; |
| 46 class IDBCursor; | 46 class IDBCursor; |
| 47 class IDBDatabase; | 47 class IDBDatabase; |
| 48 class IDBObjectStore; | 48 class IDBObjectStore; |
| 49 class IDBOpenDBRequest; | 49 class IDBOpenDBRequest; |
| 50 struct IDBObjectStoreMetadata; | 50 struct IDBObjectStoreMetadata; |
| 51 | 51 |
| 52 class IDBTransaction : public ScriptWrappable, public RefCounted<IDBTransaction>
, public EventTargetWithInlineData, public ActiveDOMObject { | 52 class IDBTransaction FINAL : public ScriptWrappable, public RefCounted<IDBTransa
ction>, public EventTargetWithInlineData, public ActiveDOMObject { |
| 53 REFCOUNTED_EVENT_TARGET(IDBTransaction); | 53 REFCOUNTED_EVENT_TARGET(IDBTransaction); |
| 54 | 54 |
| 55 public: | 55 public: |
| 56 static PassRefPtr<IDBTransaction> create(ExecutionContext*, int64_t, const V
ector<String>& objectStoreNames, IndexedDB::TransactionMode, IDBDatabase*); | 56 static PassRefPtr<IDBTransaction> create(ExecutionContext*, int64_t, const V
ector<String>& objectStoreNames, IndexedDB::TransactionMode, IDBDatabase*); |
| 57 static PassRefPtr<IDBTransaction> create(ExecutionContext*, int64_t, IDBData
base*, IDBOpenDBRequest*, const IDBDatabaseMetadata& previousMetadata); | 57 static PassRefPtr<IDBTransaction> create(ExecutionContext*, int64_t, IDBData
base*, IDBOpenDBRequest*, const IDBDatabaseMetadata& previousMetadata); |
| 58 virtual ~IDBTransaction(); | 58 virtual ~IDBTransaction(); |
| 59 | 59 |
| 60 static const AtomicString& modeReadOnly(); | 60 static const AtomicString& modeReadOnly(); |
| 61 static const AtomicString& modeReadWrite(); | 61 static const AtomicString& modeReadWrite(); |
| 62 static const AtomicString& modeVersionChange(); | 62 static const AtomicString& modeVersionChange(); |
| (...skipping 20 matching lines...) Expand all Loading... |
| 83 void unregisterRequest(IDBRequest*); | 83 void unregisterRequest(IDBRequest*); |
| 84 void objectStoreCreated(const String&, PassRefPtr<IDBObjectStore>); | 84 void objectStoreCreated(const String&, PassRefPtr<IDBObjectStore>); |
| 85 void objectStoreDeleted(const String&); | 85 void objectStoreDeleted(const String&); |
| 86 void setActive(bool); | 86 void setActive(bool); |
| 87 void setError(PassRefPtr<DOMError>); | 87 void setError(PassRefPtr<DOMError>); |
| 88 | 88 |
| 89 DEFINE_ATTRIBUTE_EVENT_LISTENER(abort); | 89 DEFINE_ATTRIBUTE_EVENT_LISTENER(abort); |
| 90 DEFINE_ATTRIBUTE_EVENT_LISTENER(complete); | 90 DEFINE_ATTRIBUTE_EVENT_LISTENER(complete); |
| 91 DEFINE_ATTRIBUTE_EVENT_LISTENER(error); | 91 DEFINE_ATTRIBUTE_EVENT_LISTENER(error); |
| 92 | 92 |
| 93 virtual void onAbort(PassRefPtr<DOMError>); | 93 void onAbort(PassRefPtr<DOMError>); |
| 94 virtual void onComplete(); | 94 void onComplete(); |
| 95 | 95 |
| 96 // EventTarget | 96 // EventTarget |
| 97 virtual const AtomicString& interfaceName() const OVERRIDE; | 97 virtual const AtomicString& interfaceName() const OVERRIDE; |
| 98 virtual ExecutionContext* executionContext() const OVERRIDE; | 98 virtual ExecutionContext* executionContext() const OVERRIDE; |
| 99 | 99 |
| 100 using EventTarget::dispatchEvent; | 100 using EventTarget::dispatchEvent; |
| 101 virtual bool dispatchEvent(PassRefPtr<Event>) OVERRIDE; | 101 virtual bool dispatchEvent(PassRefPtr<Event>) OVERRIDE; |
| 102 | 102 |
| 103 // ActiveDOMObject | 103 // ActiveDOMObject |
| 104 virtual bool hasPendingActivity() const OVERRIDE; | 104 virtual bool hasPendingActivity() const OVERRIDE; |
| (...skipping 30 matching lines...) Expand all Loading... |
| 135 IDBObjectStoreSet m_deletedObjectStores; | 135 IDBObjectStoreSet m_deletedObjectStores; |
| 136 | 136 |
| 137 typedef HashMap<RefPtr<IDBObjectStore>, IDBObjectStoreMetadata> IDBObjectSto
reMetadataMap; | 137 typedef HashMap<RefPtr<IDBObjectStore>, IDBObjectStoreMetadata> IDBObjectSto
reMetadataMap; |
| 138 IDBObjectStoreMetadataMap m_objectStoreCleanupMap; | 138 IDBObjectStoreMetadataMap m_objectStoreCleanupMap; |
| 139 IDBDatabaseMetadata m_previousMetadata; | 139 IDBDatabaseMetadata m_previousMetadata; |
| 140 }; | 140 }; |
| 141 | 141 |
| 142 } // namespace WebCore | 142 } // namespace WebCore |
| 143 | 143 |
| 144 #endif // IDBTransaction_h | 144 #endif // IDBTransaction_h |
| OLD | NEW |