OLD | NEW |
(Empty) | |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_CHANGE_HANDLER_IMPL_H_ |
| 6 #define CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_CHANGE_HANDLER_IMPL_H_ |
| 7 |
| 8 #include <memory> |
| 9 |
| 10 #include "content/browser/indexed_db/indexed_db_change_handler.h" |
| 11 |
| 12 #include "content/common/content_export.h" |
| 13 #include "third_party/WebKit/Source/modules/indexeddb/indexed_db.mojom.h" |
| 14 |
| 15 namespace content { |
| 16 |
| 17 class CONTENT_EXPORT IndexedDBChangeHandlerImpl |
| 18 : public IndexedDBChangeHandler { |
| 19 public: |
| 20 IndexedDBChangeHandlerImpl( |
| 21 ::indexed_db::mojom::DatabaseObserverPtr database_observer); |
| 22 |
| 23 // content::IndexedDBChangeHandler: |
| 24 void OnForcedClose() override; |
| 25 void OnVersionChange(int64_t old_version, int64_t new_version) override; |
| 26 void OnAbort(int64_t transaction_id, |
| 27 const IndexedDBDatabaseError& error) override; |
| 28 void OnComplete(int64_t transaction_id) override; |
| 29 void OnDatabaseChange( |
| 30 int32_t ipc_database_id, |
| 31 std::unique_ptr<IndexedDBObserverChanges> changes) override; |
| 32 void SetConnection(base::WeakPtr<IndexedDBConnection> connection) override; |
| 33 |
| 34 protected: |
| 35 ~IndexedDBChangeHandlerImpl() override; |
| 36 |
| 37 private: |
| 38 friend class base::RefCounted<IndexedDBChangeHandlerImpl>; |
| 39 |
| 40 base::WeakPtr<IndexedDBConnection> connection_; |
| 41 ::indexed_db::mojom::DatabaseObserverPtr database_observer_; |
| 42 |
| 43 DISALLOW_COPY_AND_ASSIGN(IndexedDBChangeHandlerImpl); |
| 44 }; |
| 45 |
| 46 } // namespace content |
| 47 |
| 48 #endif // CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_CHANGE_HANDLER_IMPL_H_ |
OLD | NEW |