Updating trunk VERSION from 2139.0 to 2140.0
[chromium-blink-merge.git] / content / child / indexed_db / webidbdatabase_impl.h
blob61f20018636fe12c0f685594b86d104dd446df71
1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef CONTENT_CHILD_INDEXED_DB_WEBIDBDATABASE_IMPL_H_
6 #define CONTENT_CHILD_INDEXED_DB_WEBIDBDATABASE_IMPL_H_
8 #include "base/basictypes.h"
9 #include "base/memory/ref_counted.h"
10 #include "third_party/WebKit/public/platform/WebIDBCursor.h"
11 #include "third_party/WebKit/public/platform/WebIDBDatabase.h"
12 #include "third_party/WebKit/public/platform/WebIDBTypes.h"
14 namespace blink {
15 class WebBlobInfo;
16 class WebIDBCallbacks;
17 class WebIDBDatabaseCallbacks;
18 class WebString;
21 namespace content {
22 class ThreadSafeSender;
24 class WebIDBDatabaseImpl : public blink::WebIDBDatabase {
25 public:
26 WebIDBDatabaseImpl(int32 ipc_database_id,
27 int32 ipc_database_callbacks_id,
28 ThreadSafeSender* thread_safe_sender);
29 virtual ~WebIDBDatabaseImpl();
31 // blink::WebIDBDatabase
32 virtual void createObjectStore(long long transaction_id,
33 long long objectstore_id,
34 const blink::WebString& name,
35 const blink::WebIDBKeyPath& key_path,
36 bool auto_increment);
37 virtual void deleteObjectStore(long long transaction_id,
38 long long object_store_id);
39 virtual void createTransaction(long long transaction_id,
40 blink::WebIDBDatabaseCallbacks* callbacks,
41 const blink::WebVector<long long>& scope,
42 blink::WebIDBTransactionMode mode);
44 virtual void close();
45 virtual void versionChangeIgnored();
47 virtual void get(long long transactionId,
48 long long objectStoreId,
49 long long indexId,
50 const blink::WebIDBKeyRange&,
51 bool keyOnly,
52 blink::WebIDBCallbacks*);
53 virtual void put(long long transactionId,
54 long long objectStoreId,
55 const blink::WebData& value,
56 const blink::WebVector<blink::WebBlobInfo>& webBlobInfo,
57 const blink::WebIDBKey&,
58 blink::WebIDBPutMode,
59 blink::WebIDBCallbacks*,
60 const blink::WebVector<long long>& indexIds,
61 const blink::WebVector<WebIndexKeys>&);
62 virtual void setIndexKeys(long long transactionId,
63 long long objectStoreId,
64 const blink::WebIDBKey&,
65 const blink::WebVector<long long>& indexIds,
66 const blink::WebVector<WebIndexKeys>&);
67 virtual void setIndexesReady(long long transactionId,
68 long long objectStoreId,
69 const blink::WebVector<long long>& indexIds);
70 virtual void openCursor(long long transactionId,
71 long long objectStoreId,
72 long long indexId,
73 const blink::WebIDBKeyRange&,
74 blink::WebIDBCursorDirection direction,
75 bool keyOnly,
76 blink::WebIDBTaskType,
77 blink::WebIDBCallbacks*);
78 virtual void count(long long transactionId,
79 long long objectStoreId,
80 long long indexId,
81 const blink::WebIDBKeyRange&,
82 blink::WebIDBCallbacks*);
83 virtual void deleteRange(long long transactionId,
84 long long objectStoreId,
85 const blink::WebIDBKeyRange&,
86 blink::WebIDBCallbacks*);
87 virtual void clear(long long transactionId,
88 long long objectStoreId,
89 blink::WebIDBCallbacks*);
90 virtual void createIndex(long long transactionId,
91 long long objectStoreId,
92 long long indexId,
93 const blink::WebString& name,
94 const blink::WebIDBKeyPath&,
95 bool unique,
96 bool multiEntry);
97 virtual void deleteIndex(long long transactionId,
98 long long objectStoreId,
99 long long indexId);
100 virtual void abort(long long transaction_id);
101 virtual void commit(long long transaction_id);
102 virtual void ackReceivedBlobs(
103 const blink::WebVector<blink::WebString>& uuids);
105 private:
106 int32 ipc_database_id_;
107 int32 ipc_database_callbacks_id_;
108 scoped_refptr<ThreadSafeSender> thread_safe_sender_;
111 } // namespace content
113 #endif // CONTENT_CHILD_INDEXED_DB_WEBIDBDATABASE_IMPL_H_