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

Side by Side Diff: third_party/WebKit/public/platform/modules/indexeddb/WebIDBDatabaseCallbacks.h

Issue 2601983002: [IndexedDB] Adding transaction and value support to observers (Closed)
Patch Set: Replying to comments, disallowed observing from versionchange txn Created 3 years, 11 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
1 /* 1 /*
2 * Copyright (C) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 13 matching lines...) Expand all
24 */ 24 */
25 25
26 #ifndef WebIDBDatabaseCallbacks_h 26 #ifndef WebIDBDatabaseCallbacks_h
27 #define WebIDBDatabaseCallbacks_h 27 #define WebIDBDatabaseCallbacks_h
28 28
29 #include "public/platform/WebCommon.h" 29 #include "public/platform/WebCommon.h"
30 #include "public/platform/WebVector.h" 30 #include "public/platform/WebVector.h"
31 #include "public/platform/modules/indexeddb/WebIDBDatabaseError.h" 31 #include "public/platform/modules/indexeddb/WebIDBDatabaseError.h"
32 32
33 #include <unordered_map> 33 #include <unordered_map>
34 #include <utility>
35 #include <vector>
34 36
35 namespace blink { 37 namespace blink {
36 38
37 struct WebIDBObservation; 39 struct WebIDBObservation;
38 40
39 class WebIDBDatabaseCallbacks { 41 class WebIDBDatabaseCallbacks {
40 public: 42 public:
41 virtual ~WebIDBDatabaseCallbacks() {} 43 virtual ~WebIDBDatabaseCallbacks() {}
42 44
43 virtual void onForcedClose() = 0; 45 virtual void onForcedClose() = 0;
44 virtual void onVersionChange(long long oldVersion, long long newVersion) = 0; 46 virtual void onVersionChange(long long oldVersion, long long newVersion) = 0;
45 47
46 virtual void onAbort(long long transactionId, const WebIDBDatabaseError&) = 0; 48 virtual void onAbort(long long transactionId, const WebIDBDatabaseError&) = 0;
47 virtual void onComplete(long long transactionId) = 0; 49 virtual void onComplete(long long transactionId) = 0;
48 virtual void onChanges( 50 virtual void onChanges(
49 const std::unordered_map<int32_t, std::vector<int32_t>>& 51 const std::unordered_map<int32_t, std::vector<int32_t>>&
50 observation_index_map, 52 observation_index_map,
51 const WebVector<WebIDBObservation>& observations) = 0; 53 const WebVector<WebIDBObservation>& observations,
54 const std::unordered_map<int32_t,
55 std::pair<int64_t, std::vector<int64_t>>>&
56 transactions) = 0;
52 virtual void detach() = 0; 57 virtual void detach() = 0;
53 }; 58 };
54 59
55 } // namespace blink 60 } // namespace blink
56 61
57 #endif // WebIDBDatabaseCallbacks_h 62 #endif // WebIDBDatabaseCallbacks_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698