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

Side by Side Diff: content/browser/indexed_db/indexed_db_change_handler.h

Issue 1963293002: Replacing Indexed DB Chromium IPC with Mojo Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Refactoring after Passing URLRequestContextGetter. Created 4 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 unified diff | Download patch
OLDNEW
(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_H_
6 #define CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_CHANGE_HANDLER_H_
7
8 #include <memory>
9
10 #include "base/macros.h"
11 #include "base/memory/ref_counted.h"
12 #include "base/memory/weak_ptr.h"
13 #include "content/common/content_export.h"
14
15 namespace content {
16
17 class IndexedDBConnection;
18 class IndexedDBDatabaseError;
19 class IndexedDBObserverChanges;
20
21 // A utility class to handle certain change events and notify recipients of
22 // those changes.
23 class CONTENT_EXPORT IndexedDBChangeHandler
24 : public base::RefCounted<IndexedDBChangeHandler> {
25 public:
26 virtual void OnForcedClose() = 0;
27 virtual void OnVersionChange(int64_t old_version, int64_t new_version) = 0;
28
29 virtual void OnAbort(int64_t transaction_id,
30 const IndexedDBDatabaseError& error) = 0;
31 virtual void OnComplete(int64_t transaction_id) = 0;
32 virtual void OnDatabaseChange(
33 int32_t ipc_database_id,
34 std::unique_ptr<IndexedDBObserverChanges> changes) = 0;
35
36 virtual void SetConnection(base::WeakPtr<IndexedDBConnection> connection) = 0;
37
38 protected:
39 IndexedDBChangeHandler() {}
40 virtual ~IndexedDBChangeHandler() {}
41
42 private:
43 friend class base::RefCounted<IndexedDBChangeHandler>;
44
45 DISALLOW_COPY_AND_ASSIGN(IndexedDBChangeHandler);
46 };
47
48 } // namespace content
49
50 #endif // CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_CHANGE_HANDLER_H_
OLDNEW
« no previous file with comments | « content/browser/indexed_db/indexed_db_callbacks.cc ('k') | content/browser/indexed_db/indexed_db_change_handler_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698