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

Side by Side Diff: third_party/WebKit/Source/modules/indexeddb/IDBCursorWithValue.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) 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 12 matching lines...) Expand all
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 IDBCursorWithValue_h 26 #ifndef IDBCursorWithValue_h
27 #define IDBCursorWithValue_h 27 #define IDBCursorWithValue_h
28 28
29 #include "modules/indexeddb/IDBCursor.h" 29 #include "modules/indexeddb/IDBCursor.h"
30 #include "modules/indexeddb/IndexedDB.h" 30 #include "modules/indexeddb/IndexedDB.h"
31 #include "public/platform/modules/indexeddb/WebIDBCursor.h" 31 #include "public/platform/modules/indexeddb/WebIDBCursor.h"
32 #include "public/platform/modules/indexeddb/WebIDBTypes.h" 32 #include "public/platform/modules/indexeddb/WebIDBTypes.h"
33 #include "wtf/PassOwnPtr.h" 33 #include <memory>
34 34
35 namespace blink { 35 namespace blink {
36 36
37 class IDBAny; 37 class IDBAny;
38 class IDBRequest; 38 class IDBRequest;
39 class IDBTransaction; 39 class IDBTransaction;
40 40
41 class IDBCursorWithValue final : public IDBCursor { 41 class IDBCursorWithValue final : public IDBCursor {
42 DEFINE_WRAPPERTYPEINFO(); 42 DEFINE_WRAPPERTYPEINFO();
43 public: 43 public:
44 static IDBCursorWithValue* create(PassOwnPtr<WebIDBCursor>, WebIDBCursorDire ction, IDBRequest*, IDBAny* source, IDBTransaction*); 44 static IDBCursorWithValue* create(std::unique_ptr<WebIDBCursor>, WebIDBCurso rDirection, IDBRequest*, IDBAny* source, IDBTransaction*);
45 ~IDBCursorWithValue() override; 45 ~IDBCursorWithValue() override;
46 46
47 // The value attribute defined in the IDL is simply implemented in IDBCursor (but not exposed via 47 // The value attribute defined in the IDL is simply implemented in IDBCursor (but not exposed via
48 // its IDL). This is to make the implementation more simple while matching w hat the spec says. 48 // its IDL). This is to make the implementation more simple while matching w hat the spec says.
49 49
50 bool isKeyCursor() const override { return false; } 50 bool isKeyCursor() const override { return false; }
51 bool isCursorWithValue() const override { return true; } 51 bool isCursorWithValue() const override { return true; }
52 52
53 private: 53 private:
54 IDBCursorWithValue(PassOwnPtr<WebIDBCursor>, WebIDBCursorDirection, IDBReque st*, IDBAny* source, IDBTransaction*); 54 IDBCursorWithValue(std::unique_ptr<WebIDBCursor>, WebIDBCursorDirection, IDB Request*, IDBAny* source, IDBTransaction*);
55 }; 55 };
56 56
57 DEFINE_TYPE_CASTS(IDBCursorWithValue, IDBCursor, cursor, cursor->isCursorWithVal ue(), cursor.isCursorWithValue()); 57 DEFINE_TYPE_CASTS(IDBCursorWithValue, IDBCursor, cursor, cursor->isCursorWithVal ue(), cursor.isCursorWithValue());
58 58
59 } // namespace blink 59 } // namespace blink
60 60
61 #endif // IDBCursorWithValue_h 61 #endif // IDBCursorWithValue_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698