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

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

Issue 1963293002: Replacing Indexed DB Chromium IPC with Mojo Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Some (incomplete) work on struct traits. Created 4 years, 5 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_open_request_observer.h
diff --git a/content/browser/indexed_db/indexed_db_open_request_observer.h b/content/browser/indexed_db/indexed_db_open_request_observer.h
new file mode 100644
index 0000000000000000000000000000000000000000..6492ba0067aab0a88f7875204cd21ef91b4acbc9
--- /dev/null
+++ b/content/browser/indexed_db/indexed_db_open_request_observer.h
@@ -0,0 +1,46 @@
+// 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_BROWSER_INDEXED_DB_INDEXED_DB_OPEN_REQUEST_OBSERVER_H_
+#define CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_OPEN_REQUEST_OBSERVER_H_
+
+#include <memory>
+
+#include "base/macros.h"
+#include "base/memory/ref_counted.h"
+#include "content/common/content_export.h"
+#include "third_party/WebKit/public/platform/modules/indexeddb/indexed_db.mojom.h"
+
+namespace content {
+
+class IndexedDBConnection;
+class IndexedDBDatabaseError;
+struct IndexedDBDatabaseMetadata;
+
+class CONTENT_EXPORT IndexedDBOpenRequestObserver
+ : public base::RefCounted<IndexedDBOpenRequestObserver> {
+ public:
+ IndexedDBOpenRequestObserver(
+ ::indexed_db::mojom::OpenRequestObserverPtr observer);
+
+ virtual void OnBlocked(int64_t old_version);
+
+ virtual void OnUpgradeNeeded(int64_t old_version,
+ IndexedDBConnection* connection,
+ const IndexedDBDatabaseMetadata& index_metadata);
+
+ protected:
+ virtual ~IndexedDBOpenRequestObserver();
+
+ private:
+ friend class base::RefCounted<IndexedDBOpenRequestObserver>;
+
+ ::indexed_db::mojom::OpenRequestObserverPtr observer_;
+
+ DISALLOW_COPY_AND_ASSIGN(IndexedDBOpenRequestObserver);
+};
+
+} // namespace content
+
+#endif // CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_OPEN_REQUEST_OBSERVER_H_

Powered by Google App Engine
This is Rietveld 408576698