blob: 304f9782f3ed2b13a4445a322e6358e0e040dddc [file] [log] [blame]
// 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_RENDERER_INDEXED_DB_INDEXED_DB_DATABASE_CALLBACKS_IMPL_H_
#define CONTENT_RENDERER_INDEXED_DB_INDEXED_DB_DATABASE_CALLBACKS_IMPL_H_
#include "base/single_thread_task_runner.h"
#include "third_party/blink/public/mojom/indexeddb/indexeddb.mojom.h"
namespace blink {
class WebIDBDatabaseCallbacks;
}
namespace content {
class IndexedDBDatabaseCallbacksImpl
: public blink::mojom::IDBDatabaseCallbacks {
public:
explicit IndexedDBDatabaseCallbacksImpl(
std::unique_ptr<blink::WebIDBDatabaseCallbacks> callbacks);
~IndexedDBDatabaseCallbacksImpl() override;
// blink::mojom::IDBDatabaseCallbacks 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;
void Changes(blink::mojom::IDBObserverChangesPtr changes) override;
private:
std::unique_ptr<blink::WebIDBDatabaseCallbacks> callbacks_;
DISALLOW_COPY_AND_ASSIGN(IndexedDBDatabaseCallbacksImpl);
};
} // namespace content
#endif // CONTENT_RENDERER_INDEXED_DB_INDEXED_DB_DATABASE_CALLBACKS_IMPL_H_