Chromium Code Reviews| OLD | NEW |
|---|---|
| (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 #include "mojo/public/cpp/bindings/associated_binding.h" | |
| 10 | |
| 11 namespace blink { | |
| 12 class WebIDBDatabaseCallbacks; | |
| 13 } | |
| 14 | |
| 15 namespace content { | |
| 16 | |
| 17 class IndexedDBDatabaseCallbacksImpl | |
| 18 : public indexed_db::mojom::DatabaseCallbacks { | |
| 19 public: | |
| 20 explicit IndexedDBDatabaseCallbacksImpl( | |
| 21 blink::WebIDBDatabaseCallbacks* callbacks); | |
| 22 ~IndexedDBDatabaseCallbacksImpl() override; | |
| 23 | |
| 24 void Bind(indexed_db::mojom::DatabaseCallbacksAssociatedPtrInfo* ptr_info, | |
|
Ken Rockot(use gerrit already)
2016/09/28 20:06:44
Any reason why you chose to have this take a PtrIn
Reilly Grant (use Gerrit)
2016/09/29 06:44:50
It looks like the Ptr -> Request flow works when y
Ken Rockot(use gerrit already)
2016/09/29 22:37:50
I see, so it's out of convenience because Associat
Reilly Grant (use Gerrit)
2016/09/30 07:24:20
I agree, and liked your other suggestion so I've c
| |
| 25 mojo::AssociatedGroup* associated_group); | |
| 26 void OnConnectionError(); | |
| 27 | |
| 28 // indexed_db::mojom::DatabaseCallbacks implementation | |
| 29 void ForcedClose() override; | |
| 30 void VersionChange(int64_t old_version, int64_t new_version) override; | |
| 31 void Abort(int64_t transaction_id, | |
| 32 int32_t code, | |
| 33 const base::string16& message) override; | |
| 34 void Complete(int64_t transaction_id) override; | |
| 35 | |
| 36 private: | |
| 37 scoped_refptr<base::SingleThreadTaskRunner> callback_runner_; | |
| 38 blink::WebIDBDatabaseCallbacks* callbacks_; | |
| 39 mojo::AssociatedBinding<indexed_db::mojom::DatabaseCallbacks> binding_; | |
| 40 }; | |
| 41 | |
| 42 } // namespace content | |
| 43 | |
| 44 #endif // CONTENT_CHILD_INDEXED_DB_INDEXED_DB_DATABASE_CALLBACKS_IMPL_H_ | |
| OLD | NEW |