| 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 IDBDatabaseCallbacks::TransactionMap& transactions) override; |
| 55 void detach() override; | 58 void detach() override; |
| 56 | 59 |
| 57 private: | 60 private: |
| 58 explicit WebIDBDatabaseCallbacksImpl(IDBDatabaseCallbacks*); | 61 explicit WebIDBDatabaseCallbacksImpl(IDBDatabaseCallbacks*); |
| 59 | 62 |
| 60 Persistent<IDBDatabaseCallbacks> m_callbacks; | 63 Persistent<IDBDatabaseCallbacks> m_callbacks; |
| 61 }; | 64 }; |
| 62 | 65 |
| 63 } // namespace blink | 66 } // namespace blink |
| 64 | 67 |
| 65 #endif // WebIDBDatabaseCallbacksImpl_h | 68 #endif // WebIDBDatabaseCallbacksImpl_h |
| OLD | NEW |