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

Side by Side Diff: content/child/indexed_db/webidbdatabase_impl.h

Issue 2062203004: IDBObserver: Lifetime Management: Adding Observer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Observer moved to connection 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 CONTENT_CHILD_INDEXED_DB_WEBIDBDATABASE_IMPL_H_ 5 #ifndef CONTENT_CHILD_INDEXED_DB_WEBIDBDATABASE_IMPL_H_
6 #define CONTENT_CHILD_INDEXED_DB_WEBIDBDATABASE_IMPL_H_ 6 #define CONTENT_CHILD_INDEXED_DB_WEBIDBDATABASE_IMPL_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
11 #include "third_party/WebKit/public/platform/modules/indexeddb/WebIDBCursor.h" 11 #include "third_party/WebKit/public/platform/modules/indexeddb/WebIDBCursor.h"
12 #include "third_party/WebKit/public/platform/modules/indexeddb/WebIDBDatabase.h" 12 #include "third_party/WebKit/public/platform/modules/indexeddb/WebIDBDatabase.h"
13 #include "third_party/WebKit/public/platform/modules/indexeddb/WebIDBObserver.h"
13 #include "third_party/WebKit/public/platform/modules/indexeddb/WebIDBTypes.h" 14 #include "third_party/WebKit/public/platform/modules/indexeddb/WebIDBTypes.h"
14 15
15 namespace blink { 16 namespace blink {
17 class IDBObserver;
16 class WebBlobInfo; 18 class WebBlobInfo;
17 class WebIDBCallbacks; 19 class WebIDBCallbacks;
18 class WebIDBDatabaseCallbacks; 20 class WebIDBDatabaseCallbacks;
19 class WebString; 21 class WebString;
20 } 22 }
21 23
22 namespace content { 24 namespace content {
23 class ThreadSafeSender; 25 class ThreadSafeSender;
24 26
25 class WebIDBDatabaseImpl : public blink::WebIDBDatabase { 27 class WebIDBDatabaseImpl : public blink::WebIDBDatabase {
(...skipping 12 matching lines...) Expand all
38 void deleteObjectStore(long long transaction_id, 40 void deleteObjectStore(long long transaction_id,
39 long long object_store_id) override; 41 long long object_store_id) override;
40 void createTransaction(long long transaction_id, 42 void createTransaction(long long transaction_id,
41 blink::WebIDBDatabaseCallbacks* callbacks, 43 blink::WebIDBDatabaseCallbacks* callbacks,
42 const blink::WebVector<long long>& scope, 44 const blink::WebVector<long long>& scope,
43 blink::WebIDBTransactionMode mode) override; 45 blink::WebIDBTransactionMode mode) override;
44 46
45 void close() override; 47 void close() override;
46 void versionChangeIgnored() override; 48 void versionChangeIgnored() override;
47 49
50 void observe(blink::WebIDBObserver*, long long transactionId) override;
51 void unobserve(blink::WebIDBObserver*) override;
52
48 void get(long long transactionId, 53 void get(long long transactionId,
49 long long objectStoreId, 54 long long objectStoreId,
50 long long indexId, 55 long long indexId,
51 const blink::WebIDBKeyRange&, 56 const blink::WebIDBKeyRange&,
52 bool keyOnly, 57 bool keyOnly,
53 blink::WebIDBCallbacks*) override; 58 blink::WebIDBCallbacks*) override;
54 void getAll(long long transactionId, 59 void getAll(long long transactionId,
55 long long objectStoreId, 60 long long objectStoreId,
56 long long indexId, 61 long long indexId,
57 const blink::WebIDBKeyRange&, 62 const blink::WebIDBKeyRange&,
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 long long indexId) override; 112 long long indexId) override;
108 void abort(long long transaction_id) override; 113 void abort(long long transaction_id) override;
109 void commit(long long transaction_id) override; 114 void commit(long long transaction_id) override;
110 void ackReceivedBlobs( 115 void ackReceivedBlobs(
111 const blink::WebVector<blink::WebString>& uuids) override; 116 const blink::WebVector<blink::WebString>& uuids) override;
112 117
113 private: 118 private:
114 int32_t ipc_database_id_; 119 int32_t ipc_database_id_;
115 int32_t ipc_database_callbacks_id_; 120 int32_t ipc_database_callbacks_id_;
116 scoped_refptr<ThreadSafeSender> thread_safe_sender_; 121 scoped_refptr<ThreadSafeSender> thread_safe_sender_;
122 std::vector<int32_t> observers_id_;
dmurph 2016/06/22 01:09:50 ids_
palakj1 2016/06/23 20:56:30 Done.
117 }; 123 };
118 124
119 } // namespace content 125 } // namespace content
120 126
121 #endif // CONTENT_CHILD_INDEXED_DB_WEBIDBDATABASE_IMPL_H_ 127 #endif // CONTENT_CHILD_INDEXED_DB_WEBIDBDATABASE_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698