Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef IDBObserver_h | |
| 6 #define IDBObserver_h | |
| 7 | |
| 8 #include "bindings/core/v8/ScriptWrappable.h" | |
| 9 #include "bindings/core/v8/SerializedScriptValue.h" | |
|
Marijn Kruisselbrink
2016/06/02 23:51:24
I don't see where this include is used in this fil
palakj1
2016/06/03 01:21:53
Removed.
| |
| 10 #include "modules/indexeddb/IDBDatabase.h" | |
| 11 #include "modules/indexeddb/IDBTransaction.h" | |
| 12 #include "platform/Length.h" | |
| 13 #include "platform/heap/Handle.h" | |
| 14 #include "wtf/PassRefPtr.h" | |
| 15 #include "wtf/RefPtr.h" | |
| 16 #include "wtf/text/WTFString.h" | |
| 17 | |
| 18 namespace blink { | |
| 19 | |
| 20 class IDBObserverCallback; | |
| 21 class IDBObserverInit; | |
| 22 | |
| 23 class IDBObserver final : public GarbageCollectedFinalized<IDBObserver>, public ScriptWrappable { | |
| 24 DEFINE_WRAPPERTYPEINFO(); | |
| 25 | |
| 26 public: | |
| 27 static IDBObserver* create(IDBObserverCallback&, const IDBObserverInit&); | |
| 28 long long id; | |
|
dmurph
2016/06/02 23:48:38
Don't worry about an ID for now.
Marijn Kruisselbrink
2016/06/02 23:51:24
Not sure what this |id| is?
palakj1
2016/06/03 01:21:53
id removed.
| |
| 29 WebIDBDatabase* backendDB() const; | |
|
dmurph
2016/06/02 23:48:37
Remove this too.
palakj1
2016/06/03 01:21:53
Oops! forgot to remove this. Done
| |
| 30 // API methods | |
| 31 void observe(IDBDatabase* db, IDBTransaction* tx, ExceptionState& exceptionS tate); | |
|
Marijn Kruisselbrink
2016/06/02 23:51:24
Blink styleguide doesn't want redundant parameter
palakj1
2016/06/03 01:21:53
Done
| |
| 32 | |
| 33 DECLARE_TRACE(); | |
| 34 | |
| 35 private: | |
| 36 explicit IDBObserver(IDBObserverCallback&, bool transaction, bool values, bo ol noRecords); | |
|
Marijn Kruisselbrink
2016/06/02 23:51:24
Having bool parameters (and especially having mult
palakj1
2016/06/03 01:21:53
Done
| |
| 37 void clearWeakMembers(Visitor*); | |
| 38 Member<IDBObserverCallback> m_callback; | |
| 39 bool m_transaction, m_values, m_noRecords; | |
|
Marijn Kruisselbrink
2016/06/02 23:51:24
We generally prefer having every variable or field
palakj1
2016/06/03 01:21:53
Done
| |
| 40 }; | |
| 41 | |
| 42 } // namespace blink | |
| 43 | |
| 44 #endif // IDBObserver_h | |
| OLD | NEW |