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

Unified Diff: content/browser/indexed_db/indexed_db_database_callbacks_wrapper.h

Issue 15564008: Migrate the IndexedDB backend from Blink to Chromium (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Coding style fixes Created 7 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/indexed_db/indexed_db_database_callbacks_wrapper.h
diff --git a/content/browser/indexed_db/indexed_db_database_callbacks_wrapper.h b/content/browser/indexed_db/indexed_db_database_callbacks_wrapper.h
new file mode 100644
index 0000000000000000000000000000000000000000..3f56771dd7794c78c4ecdd4901e7a441bf4ee968
--- /dev/null
+++ b/content/browser/indexed_db/indexed_db_database_callbacks_wrapper.h
@@ -0,0 +1,41 @@
+// Copyright (c) 2013 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_BROWSER_INDEXED_DB_INDEXED_DB_DATABASE_CALLBACKS_WRAPPER_H_
+#define CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_DATABASE_CALLBACKS_WRAPPER_H_
+
+#include "base/memory/ref_counted.h"
+#include "base/memory/scoped_ptr.h"
+#include "base/string16.h"
+#include "content/browser/indexed_db/indexed_db_database_error.h"
+#include "third_party/WebKit/Source/Platform/chromium/public/WebIDBDatabaseCallbacks.h"
+
+namespace content {
+
+class IndexedDBDatabaseCallbacksWrapper
+ : public base::RefCounted<IndexedDBDatabaseCallbacksWrapper> {
+ public:
+ static scoped_refptr<IndexedDBDatabaseCallbacksWrapper> Create(
+ WebKit::WebIDBDatabaseCallbacks* callbacks) {
+ return make_scoped_refptr(new IndexedDBDatabaseCallbacksWrapper(callbacks));
+ }
+
+ virtual void OnForcedClose();
+ virtual void OnVersionChange(int64_t old_version, int64_t new_version);
+
+ virtual void OnAbort(int64_t transaction_id,
+ scoped_refptr<IndexedDBDatabaseError>);
+ virtual void OnComplete(int64_t transaction_id);
+
+ private:
+ explicit IndexedDBDatabaseCallbacksWrapper(WebKit::WebIDBDatabaseCallbacks*);
+ virtual ~IndexedDBDatabaseCallbacksWrapper();
+ friend class base::RefCounted<IndexedDBDatabaseCallbacksWrapper>;
+
+ scoped_ptr<WebKit::WebIDBDatabaseCallbacks> callbacks_;
+};
+
+} // namespace content
+
+#endif // CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_DATABASE_CALLBACKS_WRAPPER_H_

Powered by Google App Engine
This is Rietveld 408576698