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

Side by Side Diff: content/child/indexed_db/webidbdatabase_impl.h

Issue 320833002: [IndexedDB] Use consistent enums on both sides of IPC. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Incorporated review comments. Created 6 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 // Copyright 2013 The Chromium Authors. All rights reserved. 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 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 CONTENT_CHILD_INDEXED_DB_PROXY_WEBIDBDATABASE_IMPL_H_ 5 #ifndef CONTENT_CHILD_INDEXED_DB_PROXY_WEBIDBDATABASE_IMPL_H_
6 #define CONTENT_CHILD_INDEXED_DB_PROXY_WEBIDBDATABASE_IMPL_H_ 6 #define CONTENT_CHILD_INDEXED_DB_PROXY_WEBIDBDATABASE_IMPL_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "third_party/WebKit/public/platform/WebIDBCursor.h" 10 #include "third_party/WebKit/public/platform/WebIDBCursor.h"
11 #include "third_party/WebKit/public/platform/WebIDBDatabase.h" 11 #include "third_party/WebKit/public/platform/WebIDBDatabase.h"
12 #include "third_party/WebKit/public/platform/WebIDBTypes.h"
12 13
13 namespace blink { 14 namespace blink {
14 class WebBlobInfo; 15 class WebBlobInfo;
15 class WebIDBCallbacks; 16 class WebIDBCallbacks;
16 class WebIDBDatabaseCallbacks; 17 class WebIDBDatabaseCallbacks;
17 class WebString; 18 class WebString;
18 } 19 }
19 20
20 namespace content { 21 namespace content {
21 class ThreadSafeSender; 22 class ThreadSafeSender;
22 23
23 class WebIDBDatabaseImpl : public blink::WebIDBDatabase { 24 class WebIDBDatabaseImpl : public blink::WebIDBDatabase {
24 public: 25 public:
25 WebIDBDatabaseImpl(int32 ipc_database_id, 26 WebIDBDatabaseImpl(int32 ipc_database_id,
26 int32 ipc_database_callbacks_id, 27 int32 ipc_database_callbacks_id,
27 ThreadSafeSender* thread_safe_sender); 28 ThreadSafeSender* thread_safe_sender);
28 virtual ~WebIDBDatabaseImpl(); 29 virtual ~WebIDBDatabaseImpl();
29 30
30 // blink::WebIDBDatabase 31 // blink::WebIDBDatabase
31 virtual void createObjectStore(long long transaction_id, 32 virtual void createObjectStore(long long transaction_id,
32 long long objectstore_id, 33 long long objectstore_id,
33 const blink::WebString& name, 34 const blink::WebString& name,
34 const blink::WebIDBKeyPath& key_path, 35 const blink::WebIDBKeyPath& key_path,
35 bool auto_increment); 36 bool auto_increment);
36 virtual void deleteObjectStore(long long transaction_id, 37 virtual void deleteObjectStore(long long transaction_id,
37 long long object_store_id); 38 long long object_store_id);
38 virtual void createTransaction(long long transaction_id, 39 virtual void createTransaction(long long transaction_id,
39 blink::WebIDBDatabaseCallbacks* callbacks, 40 blink::WebIDBDatabaseCallbacks* callbacks,
40 const blink::WebVector<long long>& scope, 41 const blink::WebVector<long long>& scope,
41 blink::WebIDBDatabase::TransactionMode mode); 42 blink::WebIDBTransactionMode mode);
42 virtual void close(); 43 virtual void close();
43 virtual void get(long long transactionId, 44 virtual void get(long long transactionId,
44 long long objectStoreId, 45 long long objectStoreId,
45 long long indexId, 46 long long indexId,
46 const blink::WebIDBKeyRange&, 47 const blink::WebIDBKeyRange&,
47 bool keyOnly, 48 bool keyOnly,
48 blink::WebIDBCallbacks*); 49 blink::WebIDBCallbacks*);
49 // TODO(ericu): Remove this once it's obsolete. It's only here for the 50 // TODO(ericu): Remove this once it's obsolete. It's only here for the
50 // three-sided-patch dance. 51 // three-sided-patch dance.
51 virtual void put(long long transactionId, 52 virtual void put(long long transactionId,
52 long long objectStoreId, 53 long long objectStoreId,
53 const blink::WebData& value, 54 const blink::WebData& value,
54 const blink::WebIDBKey&, 55 const blink::WebIDBKey&,
55 PutMode, 56 blink::WebIDBPutMode,
56 blink::WebIDBCallbacks*, 57 blink::WebIDBCallbacks*,
57 const blink::WebVector<long long>& indexIds, 58 const blink::WebVector<long long>& indexIds,
58 const blink::WebVector<WebIndexKeys>&); 59 const blink::WebVector<WebIndexKeys>&);
59 virtual void put(long long transactionId, 60 virtual void put(long long transactionId,
60 long long objectStoreId, 61 long long objectStoreId,
61 const blink::WebData& value, 62 const blink::WebData& value,
62 const blink::WebVector<blink::WebBlobInfo>& webBlobInfo, 63 const blink::WebVector<blink::WebBlobInfo>& webBlobInfo,
63 const blink::WebIDBKey&, 64 const blink::WebIDBKey&,
64 PutMode, 65 blink::WebIDBPutMode,
65 blink::WebIDBCallbacks*, 66 blink::WebIDBCallbacks*,
66 const blink::WebVector<long long>& indexIds, 67 const blink::WebVector<long long>& indexIds,
67 const blink::WebVector<WebIndexKeys>&); 68 const blink::WebVector<WebIndexKeys>&);
68 virtual void setIndexKeys(long long transactionId, 69 virtual void setIndexKeys(long long transactionId,
69 long long objectStoreId, 70 long long objectStoreId,
70 const blink::WebIDBKey&, 71 const blink::WebIDBKey&,
71 const blink::WebVector<long long>& indexIds, 72 const blink::WebVector<long long>& indexIds,
72 const blink::WebVector<WebIndexKeys>&); 73 const blink::WebVector<WebIndexKeys>&);
73 virtual void setIndexesReady(long long transactionId, 74 virtual void setIndexesReady(long long transactionId,
74 long long objectStoreId, 75 long long objectStoreId,
75 const blink::WebVector<long long>& indexIds); 76 const blink::WebVector<long long>& indexIds);
76 virtual void openCursor(long long transactionId, 77 virtual void openCursor(long long transactionId,
77 long long objectStoreId, 78 long long objectStoreId,
78 long long indexId, 79 long long indexId,
79 const blink::WebIDBKeyRange&, 80 const blink::WebIDBKeyRange&,
80 blink::WebIDBCursor::Direction direction, 81 blink::WebIDBCursorDirection direction,
81 bool keyOnly, 82 bool keyOnly,
82 TaskType, 83 blink::WebIDBTaskType,
83 blink::WebIDBCallbacks*); 84 blink::WebIDBCallbacks*);
84 virtual void count(long long transactionId, 85 virtual void count(long long transactionId,
85 long long objectStoreId, 86 long long objectStoreId,
86 long long indexId, 87 long long indexId,
87 const blink::WebIDBKeyRange&, 88 const blink::WebIDBKeyRange&,
88 blink::WebIDBCallbacks*); 89 blink::WebIDBCallbacks*);
89 virtual void deleteRange(long long transactionId, 90 virtual void deleteRange(long long transactionId,
90 long long objectStoreId, 91 long long objectStoreId,
91 const blink::WebIDBKeyRange&, 92 const blink::WebIDBKeyRange&,
92 blink::WebIDBCallbacks*); 93 blink::WebIDBCallbacks*);
(...skipping 17 matching lines...) Expand all
110 111
111 private: 112 private:
112 int32 ipc_database_id_; 113 int32 ipc_database_id_;
113 int32 ipc_database_callbacks_id_; 114 int32 ipc_database_callbacks_id_;
114 scoped_refptr<ThreadSafeSender> thread_safe_sender_; 115 scoped_refptr<ThreadSafeSender> thread_safe_sender_;
115 }; 116 };
116 117
117 } // namespace content 118 } // namespace content
118 119
119 #endif // CONTENT_CHILD_INDEXED_DB_PROXY_WEBIDBDATABASE_IMPL_H_ 120 #endif // CONTENT_CHILD_INDEXED_DB_PROXY_WEBIDBDATABASE_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698