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

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

Issue 2370643004: Port messages sent by WebIDBFactoryImpl to Mojo. (Closed)
Patch Set: Address last nits and fix leaks in unit tests. Created 4 years, 2 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CONTENT_CHILD_INDEXED_DB_INDEXED_DB_DATABASE_CALLBACKS_IMPL_H_
6 #define CONTENT_CHILD_INDEXED_DB_INDEXED_DB_DATABASE_CALLBACKS_IMPL_H_
7
8 #include "content/common/indexed_db/indexed_db.mojom.h"
9
10 namespace blink {
11 class WebIDBDatabaseCallbacks;
12 }
13
14 namespace content {
15
16 class ThreadSafeSender;
17
18 class IndexedDBDatabaseCallbacksImpl
19 : public indexed_db::mojom::DatabaseCallbacks {
20 public:
21 explicit IndexedDBDatabaseCallbacksImpl(
22 std::unique_ptr<blink::WebIDBDatabaseCallbacks> callbacks,
23 scoped_refptr<ThreadSafeSender> thread_safe_sender);
24 ~IndexedDBDatabaseCallbacksImpl() override;
25
26 // indexed_db::mojom::DatabaseCallbacks implementation
27 void ForcedClose() override;
28 void VersionChange(int64_t old_version, int64_t new_version) override;
29 void Abort(int64_t transaction_id,
30 int32_t code,
31 const base::string16& message) override;
32 void Complete(int64_t transaction_id) override;
33
34 private:
35 scoped_refptr<base::SingleThreadTaskRunner> callback_runner_;
36 scoped_refptr<ThreadSafeSender> thread_safe_sender_;
37 blink::WebIDBDatabaseCallbacks* callbacks_;
38
39 DISALLOW_COPY_AND_ASSIGN(IndexedDBDatabaseCallbacksImpl);
40 };
41
42 } // namespace content
43
44 #endif // CONTENT_CHILD_INDEXED_DB_INDEXED_DB_DATABASE_CALLBACKS_IMPL_H_
OLDNEW
« no previous file with comments | « content/child/indexed_db/indexed_db_callbacks_impl.cc ('k') | content/child/indexed_db/indexed_db_database_callbacks_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698