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

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

Issue 2511403003: Send IndexedDB observations through IDBDatabaseCallbacks. (Closed)
Patch Set: Remove unnecessary forward declaration. Created 4 years 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 23 matching lines...) Expand all
34 } 34 }
35 35
36 namespace content { 36 namespace content {
37 37
38 class IndexedDBConnection; 38 class IndexedDBConnection;
39 class IndexedDBDatabaseCallbacks; 39 class IndexedDBDatabaseCallbacks;
40 class IndexedDBFactory; 40 class IndexedDBFactory;
41 class IndexedDBKey; 41 class IndexedDBKey;
42 class IndexedDBKeyPath; 42 class IndexedDBKeyPath;
43 class IndexedDBKeyRange; 43 class IndexedDBKeyRange;
44 class IndexedDBObserverChanges;
45 class IndexedDBTransaction; 44 class IndexedDBTransaction;
46 struct IndexedDBValue; 45 struct IndexedDBValue;
47 46
48 class CONTENT_EXPORT IndexedDBDatabase 47 class CONTENT_EXPORT IndexedDBDatabase
49 : NON_EXPORTED_BASE(public base::RefCounted<IndexedDBDatabase>) { 48 : NON_EXPORTED_BASE(public base::RefCounted<IndexedDBDatabase>) {
50 public: 49 public:
51 // Identifier is pair of (origin, database name). 50 // Identifier is pair of (origin, database name).
52 using Identifier = std::pair<url::Origin, base::string16>; 51 using Identifier = std::pair<url::Origin, base::string16>;
53 52
54 static const int64_t kInvalidId = 0; 53 static const int64_t kInvalidId = 0;
(...skipping 88 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
« no previous file with comments | « content/browser/indexed_db/indexed_db_callbacks.cc ('k') | content/browser/indexed_db/indexed_db_database.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698