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

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

Issue 2511403003: Send IndexedDB observations through IDBDatabaseCallbacks. (Closed)
Patch Set: Rebased. Created 4 years, 1 month 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 22 matching lines...) Expand all
33 } 33 }
34 34
35 namespace content { 35 namespace content {
36 36
37 class IndexedDBConnection; 37 class IndexedDBConnection;
38 class IndexedDBDatabaseCallbacks; 38 class IndexedDBDatabaseCallbacks;
39 class IndexedDBFactory; 39 class IndexedDBFactory;
40 class IndexedDBKey; 40 class IndexedDBKey;
41 class IndexedDBKeyPath; 41 class IndexedDBKeyPath;
42 class IndexedDBKeyRange; 42 class IndexedDBKeyRange;
43 class IndexedDBObserverChanges;
44 class IndexedDBTransaction; 43 class IndexedDBTransaction;
45 struct IndexedDBValue; 44 struct IndexedDBValue;
46 45
47 class CONTENT_EXPORT IndexedDBDatabase 46 class CONTENT_EXPORT IndexedDBDatabase
48 : NON_EXPORTED_BASE(public base::RefCounted<IndexedDBDatabase>) { 47 : NON_EXPORTED_BASE(public base::RefCounted<IndexedDBDatabase>) {
49 public: 48 public:
50 // Identifier is pair of (origin, database name). 49 // Identifier is pair of (origin, database name).
51 using Identifier = std::pair<url::Origin, base::string16>; 50 using Identifier = std::pair<url::Origin, base::string16>;
52 51
53 static const int64_t kInvalidId = 0; 52 static const int64_t kInvalidId = 0;
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 int32_t observer_id, 142 int32_t observer_id,
144 const IndexedDBObserver::Options& options); 143 const IndexedDBObserver::Options& options);
145 void RemovePendingObservers(IndexedDBConnection* connection, 144 void RemovePendingObservers(IndexedDBConnection* connection,
146 const std::vector<int32_t>& pending_observer_ids); 145 const std::vector<int32_t>& pending_observer_ids);
147 146
148 void FilterObservation(IndexedDBTransaction*, 147 void FilterObservation(IndexedDBTransaction*,
149 int64_t object_store_id, 148 int64_t object_store_id,
150 blink::WebIDBOperationType type, 149 blink::WebIDBOperationType type,
151 const IndexedDBKeyRange& key_range); 150 const IndexedDBKeyRange& key_range);
152 void SendObservations( 151 void SendObservations(
153 std::map<int32_t, std::unique_ptr<IndexedDBObserverChanges>> change_map); 152 std::map<int32_t, ::indexed_db::mojom::ObserverChangesPtr> change_map);
154 153
155 void Get(int64_t transaction_id, 154 void Get(int64_t transaction_id,
156 int64_t object_store_id, 155 int64_t object_store_id,
157 int64_t index_id, 156 int64_t index_id,
158 std::unique_ptr<IndexedDBKeyRange> key_range, 157 std::unique_ptr<IndexedDBKeyRange> key_range,
159 bool key_only, 158 bool key_only,
160 scoped_refptr<IndexedDBCallbacks> callbacks); 159 scoped_refptr<IndexedDBCallbacks> callbacks);
161 void GetAll(int64_t transaction_id, 160 void GetAll(int64_t transaction_id,
162 int64_t object_store_id, 161 int64_t object_store_id,
163 int64_t index_id, 162 int64_t index_id,
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
346 // is executing. It prevents rentrant calls if the active request completes 345 // is executing. It prevents rentrant calls if the active request completes
347 // synchronously. 346 // synchronously.
348 bool processing_pending_requests_ = false; 347 bool processing_pending_requests_ = false;
349 348
350 DISALLOW_COPY_AND_ASSIGN(IndexedDBDatabase); 349 DISALLOW_COPY_AND_ASSIGN(IndexedDBDatabase);
351 }; 350 };
352 351
353 } // namespace content 352 } // namespace content
354 353
355 #endif // CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_DATABASE_H_ 354 #endif // CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_DATABASE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698