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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 , public EventTargetWithInlineData | 53 , public EventTargetWithInlineData |
54 , public ActiveDOMObject { | 54 , public ActiveDOMObject { |
55 DEFINE_EVENT_TARGET_REFCOUNTING_WILL_BE_REMOVED(RefCountedGarbageCollected<I
DBTransaction>); | 55 DEFINE_EVENT_TARGET_REFCOUNTING_WILL_BE_REMOVED(RefCountedGarbageCollected<I
DBTransaction>); |
56 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(IDBTransaction); | 56 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(IDBTransaction); |
57 public: | 57 public: |
58 static IDBTransaction* create(ExecutionContext*, int64_t, const Vector<Strin
g>& objectStoreNames, WebIDBTransactionMode, IDBDatabase*); | 58 static IDBTransaction* create(ExecutionContext*, int64_t, const Vector<Strin
g>& objectStoreNames, WebIDBTransactionMode, IDBDatabase*); |
59 static IDBTransaction* create(ExecutionContext*, int64_t, IDBDatabase*, IDBO
penDBRequest*, const IDBDatabaseMetadata& previousMetadata); | 59 static IDBTransaction* create(ExecutionContext*, int64_t, IDBDatabase*, IDBO
penDBRequest*, const IDBDatabaseMetadata& previousMetadata); |
60 virtual ~IDBTransaction(); | 60 virtual ~IDBTransaction(); |
61 virtual void trace(Visitor*) OVERRIDE; | 61 virtual void trace(Visitor*) OVERRIDE; |
62 | 62 |
63 static const AtomicString& modeReadOnly(); | |
64 static const AtomicString& modeReadWrite(); | |
65 static const AtomicString& modeVersionChange(); | |
66 | |
67 static WebIDBTransactionMode stringToMode(const String&, ExceptionState&); | 63 static WebIDBTransactionMode stringToMode(const String&, ExceptionState&); |
68 static const AtomicString& modeToString(WebIDBTransactionMode); | |
69 | 64 |
70 // When the connection is closed backend will be 0. | 65 // When the connection is closed backend will be 0. |
71 WebIDBDatabase* backendDB() const; | 66 WebIDBDatabase* backendDB() const; |
72 | 67 |
73 int64_t id() const { return m_id; } | 68 int64_t id() const { return m_id; } |
74 bool isActive() const { return m_state == Active; } | 69 bool isActive() const { return m_state == Active; } |
75 bool isFinished() const { return m_state == Finished; } | 70 bool isFinished() const { return m_state == Finished; } |
76 bool isFinishing() const { return m_state == Finishing; } | 71 bool isFinishing() const { return m_state == Finishing; } |
77 bool isReadOnly() const { return m_mode == WebIDBTransactionModeReadOnly; } | 72 bool isReadOnly() const { return m_mode == WebIDBTransactionModeReadOnly; } |
78 bool isVersionChange() const { return m_mode == WebIDBTransactionModeVersion
Change; } | 73 bool isVersionChange() const { return m_mode == WebIDBTransactionModeVersion
Change; } |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
140 IDBObjectStoreSet m_deletedObjectStores; | 135 IDBObjectStoreSet m_deletedObjectStores; |
141 | 136 |
142 typedef HeapHashMap<Member<IDBObjectStore>, IDBObjectStoreMetadata> IDBObjec
tStoreMetadataMap; | 137 typedef HeapHashMap<Member<IDBObjectStore>, IDBObjectStoreMetadata> IDBObjec
tStoreMetadataMap; |
143 IDBObjectStoreMetadataMap m_objectStoreCleanupMap; | 138 IDBObjectStoreMetadataMap m_objectStoreCleanupMap; |
144 IDBDatabaseMetadata m_previousMetadata; | 139 IDBDatabaseMetadata m_previousMetadata; |
145 }; | 140 }; |
146 | 141 |
147 } // namespace blink | 142 } // namespace blink |
148 | 143 |
149 #endif // IDBTransaction_h | 144 #endif // IDBTransaction_h |
OLD | NEW |