Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(19)

Side by Side Diff: Source/modules/indexeddb/IDBTransaction.h

Issue 1241613004: Rework dispatchEvent so it is consistent for isTrusted support. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Work around MSVC optimization bug Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 DEFINE_ATTRIBUTE_EVENT_LISTENER(complete); 92 DEFINE_ATTRIBUTE_EVENT_LISTENER(complete);
93 DEFINE_ATTRIBUTE_EVENT_LISTENER(error); 93 DEFINE_ATTRIBUTE_EVENT_LISTENER(error);
94 94
95 void onAbort(DOMError*); 95 void onAbort(DOMError*);
96 void onComplete(); 96 void onComplete();
97 97
98 // EventTarget 98 // EventTarget
99 const AtomicString& interfaceName() const override; 99 const AtomicString& interfaceName() const override;
100 ExecutionContext* executionContext() const override; 100 ExecutionContext* executionContext() const override;
101 101
102 using EventTarget::dispatchEvent;
103 bool dispatchEvent(PassRefPtrWillBeRawPtr<Event>) override;
104
105 // ActiveDOMObject 102 // ActiveDOMObject
106 bool hasPendingActivity() const override; 103 bool hasPendingActivity() const override;
107 void stop() override; 104 void stop() override;
108 105
106 protected:
107 // EventTarget
108 bool dispatchEventInternal(PassRefPtrWillBeRawPtr<Event>) override;
109
109 private: 110 private:
110 IDBTransaction(ScriptState*, int64_t, const HashSet<String>&, WebIDBTransact ionMode, IDBDatabase*, IDBOpenDBRequest*, const IDBDatabaseMetadata&); 111 IDBTransaction(ScriptState*, int64_t, const HashSet<String>&, WebIDBTransact ionMode, IDBDatabase*, IDBOpenDBRequest*, const IDBDatabaseMetadata&);
111 112
112 void enqueueEvent(PassRefPtrWillBeRawPtr<Event>); 113 void enqueueEvent(PassRefPtrWillBeRawPtr<Event>);
113 114
114 enum State { 115 enum State {
115 Inactive, // Created or started, but not in an event callback 116 Inactive, // Created or started, but not in an event callback
116 Active, // Created or started, in creation scope or an event callback 117 Active, // Created or started, in creation scope or an event callback
117 Finishing, // In the process of aborting or completing. 118 Finishing, // In the process of aborting or completing.
118 Finished, // No more events will fire and no new requests may be filed. 119 Finished, // No more events will fire and no new requests may be filed.
(...skipping 18 matching lines...) Expand all
137 IDBObjectStoreSet m_deletedObjectStores; 138 IDBObjectStoreSet m_deletedObjectStores;
138 139
139 typedef HeapHashMap<Member<IDBObjectStore>, IDBObjectStoreMetadata> IDBObjec tStoreMetadataMap; 140 typedef HeapHashMap<Member<IDBObjectStore>, IDBObjectStoreMetadata> IDBObjec tStoreMetadataMap;
140 IDBObjectStoreMetadataMap m_objectStoreCleanupMap; 141 IDBObjectStoreMetadataMap m_objectStoreCleanupMap;
141 IDBDatabaseMetadata m_previousMetadata; 142 IDBDatabaseMetadata m_previousMetadata;
142 }; 143 };
143 144
144 } // namespace blink 145 } // namespace blink
145 146
146 #endif // IDBTransaction_h 147 #endif // IDBTransaction_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698