Chromium Code Reviews| Index: content/child/indexed_db/indexed_db_database_callbacks_impl.h |
| diff --git a/content/child/indexed_db/indexed_db_database_callbacks_impl.h b/content/child/indexed_db/indexed_db_database_callbacks_impl.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..1e431e7df200c06ece10610538b462536d6014b4 |
| --- /dev/null |
| +++ b/content/child/indexed_db/indexed_db_database_callbacks_impl.h |
| @@ -0,0 +1,44 @@ |
| +// Copyright 2016 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef CONTENT_CHILD_INDEXED_DB_INDEXED_DB_DATABASE_CALLBACKS_IMPL_H_ |
| +#define CONTENT_CHILD_INDEXED_DB_INDEXED_DB_DATABASE_CALLBACKS_IMPL_H_ |
| + |
| +#include "content/common/indexed_db/indexed_db.mojom.h" |
| +#include "mojo/public/cpp/bindings/associated_binding.h" |
| + |
| +namespace blink { |
| +class WebIDBDatabaseCallbacks; |
| +} |
| + |
| +namespace content { |
| + |
| +class IndexedDBDatabaseCallbacksImpl |
| + : public indexed_db::mojom::DatabaseCallbacks { |
| + public: |
| + explicit IndexedDBDatabaseCallbacksImpl( |
| + blink::WebIDBDatabaseCallbacks* callbacks); |
| + ~IndexedDBDatabaseCallbacksImpl() override; |
| + |
| + 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
|
| + mojo::AssociatedGroup* associated_group); |
| + void OnConnectionError(); |
| + |
| + // indexed_db::mojom::DatabaseCallbacks implementation |
| + void ForcedClose() override; |
| + void VersionChange(int64_t old_version, int64_t new_version) override; |
| + void Abort(int64_t transaction_id, |
| + int32_t code, |
| + const base::string16& message) override; |
| + void Complete(int64_t transaction_id) override; |
| + |
| + private: |
| + scoped_refptr<base::SingleThreadTaskRunner> callback_runner_; |
| + blink::WebIDBDatabaseCallbacks* callbacks_; |
| + mojo::AssociatedBinding<indexed_db::mojom::DatabaseCallbacks> binding_; |
| +}; |
| + |
| +} // namespace content |
| + |
| +#endif // CONTENT_CHILD_INDEXED_DB_INDEXED_DB_DATABASE_CALLBACKS_IMPL_H_ |