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

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

Issue 1963293002: Replacing Indexed DB Chromium IPC with Mojo Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Refactoring after Passing URLRequestContextGetter. Created 4 years, 4 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 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef IDBValue_h 5 #ifndef IDBValue_h
6 #define IDBValue_h 6 #define IDBValue_h
7 7
8 #include "Source/modules/indexeddb/indexed_db.mojom-blink.h"
8 #include "modules/ModulesExport.h" 9 #include "modules/ModulesExport.h"
9 #include "modules/indexeddb/IDBKey.h" 10 #include "modules/indexeddb/IDBKey.h"
10 #include "modules/indexeddb/IDBKeyPath.h" 11 #include "modules/indexeddb/IDBKeyPath.h"
11 #include "platform/SharedBuffer.h" 12 #include "platform/SharedBuffer.h"
12 #include "public/platform/WebVector.h" 13 #include "public/platform/WebVector.h"
13 #include "wtf/RefPtr.h" 14 #include "wtf/RefPtr.h"
14 #include <memory> 15 #include <memory>
15 16
16 namespace blink { 17 namespace blink {
17 18
18 class BlobDataHandle; 19 class BlobDataHandle;
19 class WebBlobInfo; 20 class WebBlobInfo;
20 struct WebIDBValue;
21 21
22 class MODULES_EXPORT IDBValue final : public RefCounted<IDBValue> { 22 class MODULES_EXPORT IDBValue final : public RefCounted<IDBValue> {
23 public: 23 public:
24 static PassRefPtr<IDBValue> create(); 24 static PassRefPtr<IDBValue> create();
25 static PassRefPtr<IDBValue> create(const WebIDBValue&); 25 static PassRefPtr<IDBValue> create(indexed_db::mojom::blink::ValuePtr);
26 static PassRefPtr<IDBValue> create(const IDBValue*, IDBKey*, const IDBKeyPat h&); 26 static PassRefPtr<IDBValue> create(const IDBValue*, IDBKey*, const IDBKeyPat h&);
27 ~IDBValue(); 27 ~IDBValue();
28 28
29 bool isNull() const; 29 bool isNull() const;
30 Vector<String> getUUIDs() const; 30 Vector<String> getUUIDs() const;
31 const SharedBuffer* data() const; 31 const SharedBuffer* data() const;
32 Vector<WebBlobInfo>* blobInfo() const { return m_blobInfo.get(); } 32 Vector<WebBlobInfo>* blobInfo() const { return m_blobInfo.get(); }
33 const IDBKey* primaryKey() const { return m_primaryKey; } 33 const IDBKey* primaryKey() const { return m_primaryKey; }
34 const IDBKeyPath& keyPath() const { return m_keyPath; } 34 const IDBKeyPath& keyPath() const { return m_keyPath; }
35 35
36 private: 36 private:
37 IDBValue(); 37 IDBValue();
38 IDBValue(const WebIDBValue&); 38 IDBValue(const indexed_db::mojom::blink::ValuePtr);
39 IDBValue(PassRefPtr<SharedBuffer>, const WebVector<WebBlobInfo>&, IDBKey*, c onst IDBKeyPath&); 39 IDBValue(PassRefPtr<SharedBuffer>, const WebVector<WebBlobInfo>&, IDBKey*, c onst IDBKeyPath&);
40 IDBValue(const IDBValue*, IDBKey*, const IDBKeyPath&); 40 IDBValue(const IDBValue*, IDBKey*, const IDBKeyPath&);
41 void setBlobData(const WebVector<WebBlobInfo>&);
41 42
42 const RefPtr<SharedBuffer> m_data; 43 const RefPtr<SharedBuffer> m_data;
43 const std::unique_ptr<Vector<RefPtr<BlobDataHandle>>> m_blobData; 44 const std::unique_ptr<Vector<RefPtr<BlobDataHandle>>> m_blobData;
44 const std::unique_ptr<Vector<WebBlobInfo>> m_blobInfo; 45 const std::unique_ptr<Vector<WebBlobInfo>> m_blobInfo;
45 const Persistent<IDBKey> m_primaryKey; 46 const Persistent<IDBKey> m_primaryKey;
46 const IDBKeyPath m_keyPath; 47 const IDBKeyPath m_keyPath;
47 }; 48 };
48 49
49 } // namespace blink 50 } // namespace blink
50 51
51 #endif 52 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698