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

Side by Side Diff: content/child/indexed_db/indexed_db_database_callbacks_impl.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 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 CONTENT_CHILD_INDEXED_DB_INDEXED_DB_DATABASE_CALLBACKS_IMPL_H_ 5 #ifndef CONTENT_CHILD_INDEXED_DB_INDEXED_DB_DATABASE_CALLBACKS_IMPL_H_
6 #define CONTENT_CHILD_INDEXED_DB_INDEXED_DB_DATABASE_CALLBACKS_IMPL_H_ 6 #define CONTENT_CHILD_INDEXED_DB_INDEXED_DB_DATABASE_CALLBACKS_IMPL_H_
7 7
8 #include "content/common/indexed_db/indexed_db.mojom.h" 8 #include "content/common/indexed_db/indexed_db.mojom.h"
9 9
10 namespace blink { 10 namespace blink {
11 class WebIDBDatabaseCallbacks; 11 class WebIDBDatabaseCallbacks;
12 } 12 }
13 13
14 namespace content { 14 namespace content {
15 15
16 class IndexedDBDatabaseCallbacksImpl 16 class IndexedDBDatabaseCallbacksImpl
17 : public indexed_db::mojom::DatabaseCallbacks { 17 : public indexed_db::mojom::DatabaseCallbacks {
18 public: 18 public:
19 explicit IndexedDBDatabaseCallbacksImpl( 19 explicit IndexedDBDatabaseCallbacksImpl(
20 std::unique_ptr<blink::WebIDBDatabaseCallbacks> callbacks); 20 std::unique_ptr<blink::WebIDBDatabaseCallbacks> callbacks);
21 ~IndexedDBDatabaseCallbacksImpl() override; 21 ~IndexedDBDatabaseCallbacksImpl() override;
22 22
23 // indexed_db::mojom::DatabaseCallbacks implementation 23 // indexed_db::mojom::DatabaseCallbacks implementation
24 void ForcedClose() override; 24 void ForcedClose() override;
25 void VersionChange(int64_t old_version, int64_t new_version) override; 25 void VersionChange(int64_t old_version, int64_t new_version) override;
26 void Abort(int64_t transaction_id, 26 void Abort(int64_t transaction_id,
27 int32_t code, 27 int32_t code,
28 const base::string16& message) override; 28 const base::string16& message) override;
29 void Complete(int64_t transaction_id) override; 29 void Complete(int64_t transaction_id) override;
30 void Changes(indexed_db::mojom::ObserverChangesPtr changes) override;
30 31
31 private: 32 private:
32 scoped_refptr<base::SingleThreadTaskRunner> callback_runner_; 33 scoped_refptr<base::SingleThreadTaskRunner> callback_runner_;
33 blink::WebIDBDatabaseCallbacks* callbacks_; 34 blink::WebIDBDatabaseCallbacks* callbacks_;
34 35
35 DISALLOW_COPY_AND_ASSIGN(IndexedDBDatabaseCallbacksImpl); 36 DISALLOW_COPY_AND_ASSIGN(IndexedDBDatabaseCallbacksImpl);
36 }; 37 };
37 38
38 } // namespace content 39 } // namespace content
39 40
40 #endif // CONTENT_CHILD_INDEXED_DB_INDEXED_DB_DATABASE_CALLBACKS_IMPL_H_ 41 #endif // CONTENT_CHILD_INDEXED_DB_INDEXED_DB_DATABASE_CALLBACKS_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698