OLD | NEW |
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 14 matching lines...) Expand all Loading... |
25 | 25 |
26 #ifndef WebIDBDatabaseCallbacksImpl_h | 26 #ifndef WebIDBDatabaseCallbacksImpl_h |
27 #define WebIDBDatabaseCallbacksImpl_h | 27 #define WebIDBDatabaseCallbacksImpl_h |
28 | 28 |
29 #include "modules/indexeddb/IDBDatabaseCallbacks.h" | 29 #include "modules/indexeddb/IDBDatabaseCallbacks.h" |
30 #include "public/platform/WebString.h" | 30 #include "public/platform/WebString.h" |
31 #include "public/platform/modules/indexeddb/WebIDBDatabaseCallbacks.h" | 31 #include "public/platform/modules/indexeddb/WebIDBDatabaseCallbacks.h" |
32 #include "public/platform/modules/indexeddb/WebIDBDatabaseError.h" | 32 #include "public/platform/modules/indexeddb/WebIDBDatabaseError.h" |
33 #include "wtf/PassRefPtr.h" | 33 #include "wtf/PassRefPtr.h" |
34 #include "wtf/RefPtr.h" | 34 #include "wtf/RefPtr.h" |
| 35 |
35 #include <memory> | 36 #include <memory> |
36 | 37 |
37 namespace blink { | 38 namespace blink { |
38 | 39 |
39 class WebIDBDatabaseCallbacksImpl final : public WebIDBDatabaseCallbacks { | 40 class WebIDBDatabaseCallbacksImpl final : public WebIDBDatabaseCallbacks { |
40 USING_FAST_MALLOC(WebIDBDatabaseCallbacksImpl); | 41 USING_FAST_MALLOC(WebIDBDatabaseCallbacksImpl); |
41 | 42 |
42 public: | 43 public: |
43 static std::unique_ptr<WebIDBDatabaseCallbacksImpl> create( | 44 static std::unique_ptr<WebIDBDatabaseCallbacksImpl> create( |
44 IDBDatabaseCallbacks*); | 45 IDBDatabaseCallbacks*); |
45 | 46 |
46 ~WebIDBDatabaseCallbacksImpl() override; | 47 ~WebIDBDatabaseCallbacksImpl() override; |
47 | 48 |
48 void onForcedClose() override; | 49 void onForcedClose() override; |
49 void onVersionChange(long long oldVersion, long long newVersion) override; | 50 void onVersionChange(long long oldVersion, long long newVersion) override; |
50 void onAbort(long long transactionId, const WebIDBDatabaseError&) override; | 51 void onAbort(long long transactionId, const WebIDBDatabaseError&) override; |
51 void onComplete(long long transactionId) override; | 52 void onComplete(long long transactionId) override; |
52 void onChanges(const std::unordered_map<int32_t, std::vector<int32_t>>& | 53 void onChanges( |
53 observation_index_map, | 54 const std::unordered_map<int32_t, std::vector<int32_t>>& |
54 const WebVector<WebIDBObservation>& observations) override; | 55 observation_index_map, |
| 56 const WebVector<WebIDBObservation>& observations, |
| 57 const std::unordered_map<int32_t, |
| 58 std::pair<int64_t, std::vector<int64_t>>>& |
| 59 transactions) override; |
55 void detach() override; | 60 void detach() override; |
56 | 61 |
57 private: | 62 private: |
58 explicit WebIDBDatabaseCallbacksImpl(IDBDatabaseCallbacks*); | 63 explicit WebIDBDatabaseCallbacksImpl(IDBDatabaseCallbacks*); |
59 | 64 |
60 Persistent<IDBDatabaseCallbacks> m_callbacks; | 65 Persistent<IDBDatabaseCallbacks> m_callbacks; |
61 }; | 66 }; |
62 | 67 |
63 } // namespace blink | 68 } // namespace blink |
64 | 69 |
65 #endif // WebIDBDatabaseCallbacksImpl_h | 70 #endif // WebIDBDatabaseCallbacksImpl_h |
OLD | NEW |