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

Unified Diff: chrome/browser/in_process_webkit/indexed_db_callbacks.h

Issue 3165026: [IndexedDB] Add transaction coordinator. (Closed)
Patch Set: Fix Jeremy's comments Created 10 years, 4 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: chrome/browser/in_process_webkit/indexed_db_callbacks.h
diff --git a/chrome/browser/in_process_webkit/indexed_db_callbacks.h b/chrome/browser/in_process_webkit/indexed_db_callbacks.h
index 2bb6b2a027493d35ad3ee401027ceb29607ce892..510f98902cad549aaff17a42b14bb60ae9513ea4 100644
--- a/chrome/browser/in_process_webkit/indexed_db_callbacks.h
+++ b/chrome/browser/in_process_webkit/indexed_db_callbacks.h
@@ -14,6 +14,7 @@
#include "chrome/common/render_messages.h"
#include "chrome/common/serialized_script_value.h"
#include "third_party/WebKit/WebKit/chromium/public/WebIDBCallbacks.h"
+#include "third_party/WebKit/WebKit/chromium/public/WebIDBTransactionCallbacks.h"
#include "third_party/WebKit/WebKit/chromium/public/WebIDBDatabaseError.h"
// Template magic to figure out what message to send to the renderer based on
@@ -132,5 +133,27 @@ class IndexedDBCallbacks<void> : public IndexedDBCallbacksBase {
DISALLOW_IMPLICIT_CONSTRUCTORS(IndexedDBCallbacks);
};
+class IndexedDBTransactionCallbacks
+ : public WebKit::WebIDBTransactionCallbacks {
+public:
+ IndexedDBTransactionCallbacks(
+ IndexedDBDispatcherHost* dispatcher_host, int transaction_id)
+ : dispatcher_host_(dispatcher_host), transaction_id_(transaction_id) {
+ }
+
+ virtual void onAbort() {
+ dispatcher_host_->Send(new ViewMsg_IDBTransactionCallbacksAbort(
+ transaction_id_));
+ }
+
+ virtual int id() const {
+ return transaction_id_;
+ }
+
+private:
+ int transaction_id_;
+ scoped_refptr<IndexedDBDispatcherHost> dispatcher_host_;
+};
+
#endif // CHROME_BROWSER_IN_PROCESS_WEBKIT_INDEXED_DB_CALLBACKS_H_

Powered by Google App Engine
This is Rietveld 408576698