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

Side by Side Diff: content/browser/indexed_db/indexed_db_database.h

Issue 2125213002: [IndexedDB] Propogating changes to observers : Renderer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lifetime
Patch Set: Minor bugs fixed Created 4 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 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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_BROWSER_INDEXED_DB_INDEXED_DB_DATABASE_H_ 5 #ifndef CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_DATABASE_H_
6 #define CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_DATABASE_H_ 6 #define CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_DATABASE_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 21 matching lines...) Expand all
32 32
33 namespace content { 33 namespace content {
34 34
35 class IndexedDBBlobInfo; 35 class IndexedDBBlobInfo;
36 class IndexedDBConnection; 36 class IndexedDBConnection;
37 class IndexedDBDatabaseCallbacks; 37 class IndexedDBDatabaseCallbacks;
38 class IndexedDBFactory; 38 class IndexedDBFactory;
39 class IndexedDBKey; 39 class IndexedDBKey;
40 class IndexedDBKeyPath; 40 class IndexedDBKeyPath;
41 class IndexedDBKeyRange; 41 class IndexedDBKeyRange;
42 class IndexedDBObservation;
43 class IndexedDBObserverChanges;
42 class IndexedDBTransaction; 44 class IndexedDBTransaction;
43 struct IndexedDBValue; 45 struct IndexedDBValue;
44 46
45 class CONTENT_EXPORT IndexedDBDatabase 47 class CONTENT_EXPORT IndexedDBDatabase
46 : NON_EXPORTED_BASE(public base::RefCounted<IndexedDBDatabase>) { 48 : NON_EXPORTED_BASE(public base::RefCounted<IndexedDBDatabase>) {
47 public: 49 public:
48 // An index and corresponding set of keys 50 // An index and corresponding set of keys
49 using IndexKeys = std::pair<int64_t, std::vector<IndexedDBKey>>; 51 using IndexKeys = std::pair<int64_t, std::vector<IndexedDBKey>>;
50 52
51 // Identifier is pair of (origin, database name). 53 // Identifier is pair of (origin, database name).
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 const IndexedDBTransactionCoordinator& transaction_coordinator() const { 120 const IndexedDBTransactionCoordinator& transaction_coordinator() const {
119 return transaction_coordinator_; 121 return transaction_coordinator_;
120 } 122 }
121 123
122 void TransactionCreated(IndexedDBTransaction* transaction); 124 void TransactionCreated(IndexedDBTransaction* transaction);
123 void TransactionFinished(IndexedDBTransaction* transaction, bool committed); 125 void TransactionFinished(IndexedDBTransaction* transaction, bool committed);
124 126
125 // Called by transactions to report failure committing to the backing store. 127 // Called by transactions to report failure committing to the backing store.
126 void TransactionCommitFailed(const leveldb::Status& status); 128 void TransactionCommitFailed(const leveldb::Status& status);
127 129
128 void AddPendingObserver(int64_t transaction_id, int32_t observer_id); 130 void AddPendingObserver(int64_t transaction_id,
131 int32_t observer_id,
132 bool includeTransaction,
133 bool noRecords,
134 bool values);
129 void RemovePendingObservers(IndexedDBConnection* connection, 135 void RemovePendingObservers(IndexedDBConnection* connection,
130 const std::vector<int32_t>& pending_observer_ids); 136 const std::vector<int32_t>& pending_observer_ids);
131 137
138 void FilterObservation(IndexedDBTransaction*,
139 int64_t object_store_id,
140 blink::WebIDBOperationType type,
141 const IndexedDBKeyRange& key_range);
142 void SendObservations(
143 std::map<int32_t, std::unique_ptr<IndexedDBObserverChanges>> change_map);
144
132 void Get(int64_t transaction_id, 145 void Get(int64_t transaction_id,
133 int64_t object_store_id, 146 int64_t object_store_id,
134 int64_t index_id, 147 int64_t index_id,
135 std::unique_ptr<IndexedDBKeyRange> key_range, 148 std::unique_ptr<IndexedDBKeyRange> key_range,
136 bool key_only, 149 bool key_only,
137 scoped_refptr<IndexedDBCallbacks> callbacks); 150 scoped_refptr<IndexedDBCallbacks> callbacks);
138 void GetAll(int64_t transaction_id, 151 void GetAll(int64_t transaction_id,
139 int64_t object_store_id, 152 int64_t object_store_id,
140 int64_t index_id, 153 int64_t index_id,
141 std::unique_ptr<IndexedDBKeyRange> key_range, 154 std::unique_ptr<IndexedDBKeyRange> key_range,
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
315 328
316 ConnectionSet connections_; 329 ConnectionSet connections_;
317 bool experimental_web_platform_features_enabled_; 330 bool experimental_web_platform_features_enabled_;
318 331
319 DISALLOW_COPY_AND_ASSIGN(IndexedDBDatabase); 332 DISALLOW_COPY_AND_ASSIGN(IndexedDBDatabase);
320 }; 333 };
321 334
322 } // namespace content 335 } // namespace content
323 336
324 #endif // CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_DATABASE_H_ 337 #endif // CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_DATABASE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698