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

Side by Side Diff: third_party/WebKit/Source/modules/indexeddb/IDBOpenDBRequest.h

Issue 2050123002: Remove OwnPtr from Blink. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: First attempt to land. Created 4 years, 6 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) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 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 11 matching lines...) Expand all
22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
23 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 23 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24 */ 24 */
25 25
26 #ifndef IDBOpenDBRequest_h 26 #ifndef IDBOpenDBRequest_h
27 #define IDBOpenDBRequest_h 27 #define IDBOpenDBRequest_h
28 28
29 #include "modules/ModulesExport.h" 29 #include "modules/ModulesExport.h"
30 #include "modules/indexeddb/IDBRequest.h" 30 #include "modules/indexeddb/IDBRequest.h"
31 #include "public/platform/modules/indexeddb/WebIDBDatabase.h" 31 #include "public/platform/modules/indexeddb/WebIDBDatabase.h"
32 #include <memory>
32 33
33 namespace blink { 34 namespace blink {
34 35
35 class IDBDatabaseCallbacks; 36 class IDBDatabaseCallbacks;
36 37
37 class MODULES_EXPORT IDBOpenDBRequest final : public IDBRequest { 38 class MODULES_EXPORT IDBOpenDBRequest final : public IDBRequest {
38 DEFINE_WRAPPERTYPEINFO(); 39 DEFINE_WRAPPERTYPEINFO();
39 public: 40 public:
40 static IDBOpenDBRequest* create(ScriptState*, IDBDatabaseCallbacks*, int64_t transactionId, int64_t version); 41 static IDBOpenDBRequest* create(ScriptState*, IDBDatabaseCallbacks*, int64_t transactionId, int64_t version);
41 ~IDBOpenDBRequest() override; 42 ~IDBOpenDBRequest() override;
42 DECLARE_VIRTUAL_TRACE(); 43 DECLARE_VIRTUAL_TRACE();
43 44
44 using IDBRequest::onSuccess; 45 using IDBRequest::onSuccess;
45 46
46 void onBlocked(int64_t existingVersion) override; 47 void onBlocked(int64_t existingVersion) override;
47 void onUpgradeNeeded(int64_t oldVersion, PassOwnPtr<WebIDBDatabase>, const I DBDatabaseMetadata&, WebIDBDataLoss, String dataLossMessage) override; 48 void onUpgradeNeeded(int64_t oldVersion, std::unique_ptr<WebIDBDatabase>, co nst IDBDatabaseMetadata&, WebIDBDataLoss, String dataLossMessage) override;
48 void onSuccess(PassOwnPtr<WebIDBDatabase>, const IDBDatabaseMetadata&) overr ide; 49 void onSuccess(std::unique_ptr<WebIDBDatabase>, const IDBDatabaseMetadata&) override;
49 void onSuccess(int64_t oldVersion) override; 50 void onSuccess(int64_t oldVersion) override;
50 51
51 // EventTarget 52 // EventTarget
52 const AtomicString& interfaceName() const override; 53 const AtomicString& interfaceName() const override;
53 54
54 DEFINE_ATTRIBUTE_EVENT_LISTENER(blocked); 55 DEFINE_ATTRIBUTE_EVENT_LISTENER(blocked);
55 DEFINE_ATTRIBUTE_EVENT_LISTENER(upgradeneeded); 56 DEFINE_ATTRIBUTE_EVENT_LISTENER(upgradeneeded);
56 57
57 protected: 58 protected:
58 bool shouldEnqueueEvent() const override; 59 bool shouldEnqueueEvent() const override;
59 60
60 // EventTarget 61 // EventTarget
61 DispatchEventResult dispatchEventInternal(Event*) override; 62 DispatchEventResult dispatchEventInternal(Event*) override;
62 63
63 private: 64 private:
64 IDBOpenDBRequest(ScriptState*, IDBDatabaseCallbacks*, int64_t transactionId, int64_t version); 65 IDBOpenDBRequest(ScriptState*, IDBDatabaseCallbacks*, int64_t transactionId, int64_t version);
65 66
66 Member<IDBDatabaseCallbacks> m_databaseCallbacks; 67 Member<IDBDatabaseCallbacks> m_databaseCallbacks;
67 const int64_t m_transactionId; 68 const int64_t m_transactionId;
68 int64_t m_version; 69 int64_t m_version;
69 }; 70 };
70 71
71 } // namespace blink 72 } // namespace blink
72 73
73 #endif // IDBOpenDBRequest_h 74 #endif // IDBOpenDBRequest_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698