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

Side by Side Diff: third_party/WebKit/Source/modules/indexeddb/IDBObserver.h

Issue 2062203004: IDBObserver: Lifetime Management: Adding Observer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: post dmuprh review Created 4 years, 6 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 // Copyright 2016 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef IDBObserver_h 5 #ifndef IDBObserver_h
6 #define IDBObserver_h 6 #define IDBObserver_h
dmurph 2016/06/23 21:53:05 Please use the new copyright header https://www.ch
palakj1 2016/06/24 00:03:01 Isn't it the same header?
7 7
8 #include "bindings/core/v8/ScriptWrappable.h" 8 #include "bindings/core/v8/ScriptWrappable.h"
9 #include "modules/indexeddb/IDBDatabase.h"
10 #include "modules/indexeddb/IDBTransaction.h"
11 #include "platform/heap/Handle.h" 9 #include "platform/heap/Handle.h"
12 10
13 namespace blink { 11 namespace blink {
14 12
13 class ExceptionState;
15 class IDBObserverCallback; 14 class IDBObserverCallback;
16 class IDBObserverInit; 15 class IDBObserverInit;
16 class IDBDatabase;
17 class IDBTransaction;
17 18
18 class IDBObserver final : public GarbageCollectedFinalized<IDBObserver>, public ScriptWrappable { 19 class IDBObserver final : public GarbageCollectedFinalized<IDBObserver>, public ScriptWrappable {
19 DEFINE_WRAPPERTYPEINFO(); 20 DEFINE_WRAPPERTYPEINFO();
20 21
21 public: 22 public:
22 static IDBObserver* create(IDBObserverCallback&, const IDBObserverInit&); 23 static IDBObserver* create(IDBObserverCallback&, const IDBObserverInit&);
23 ~IDBObserver(); 24 ~IDBObserver();
24 // API methods 25 // API methods
25 void observe(IDBDatabase*, IDBTransaction*, ExceptionState&); 26 void observe(IDBDatabase*, IDBTransaction*, ExceptionState&);
27 void unobserve(IDBDatabase*, ExceptionState&);
26 28
27 DECLARE_TRACE(); 29 DECLARE_TRACE();
28 30
29 private: 31 private:
30 explicit IDBObserver(IDBObserverCallback&, const IDBObserverInit&); 32 IDBObserver(IDBObserverCallback&, const IDBObserverInit&);
31 33
32 Member<IDBObserverCallback> m_callback; 34 Member<IDBObserverCallback> m_callback;
33 bool m_transaction; 35 bool m_transaction;
34 bool m_values; 36 bool m_values;
35 bool m_noRecords; 37 bool m_noRecords;
36 }; 38 };
37 39
38 } // namespace blink 40 } // namespace blink
39 41
40 #endif // IDBObserver_h 42 #endif // IDBObserver_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698