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

Side by Side Diff: content/browser/in_process_webkit/indexed_db_dispatcher_host.h

Issue 11791009: IPC implementation for create/delete ObjectStore/Index (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Add HostTransactionId where appropriate Created 7 years, 11 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
« no previous file with comments | « no previous file | content/browser/in_process_webkit/indexed_db_dispatcher_host.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_BROWSER_IN_PROCESS_WEBKIT_INDEXED_DB_DISPATCHER_HOST_H_ 5 #ifndef CONTENT_BROWSER_IN_PROCESS_WEBKIT_INDEXED_DB_DISPATCHER_HOST_H_
6 #define CONTENT_BROWSER_IN_PROCESS_WEBKIT_INDEXED_DB_DISPATCHER_HOST_H_ 6 #define CONTENT_BROWSER_IN_PROCESS_WEBKIT_INDEXED_DB_DISPATCHER_HOST_H_
7 7
8 #include <map> 8 #include <map>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/basictypes.h" 11 #include "base/basictypes.h"
12 #include "base/id_map.h" 12 #include "base/id_map.h"
13 #include "content/public/browser/browser_message_filter.h" 13 #include "content/public/browser/browser_message_filter.h"
14 #include "third_party/WebKit/Source/WebKit/chromium/public/WebExceptionCode.h" 14 #include "third_party/WebKit/Source/WebKit/chromium/public/WebExceptionCode.h"
15 15
16 class GURL; 16 class GURL;
17 struct IndexedDBDatabaseMetadata; 17 struct IndexedDBDatabaseMetadata;
18 struct IndexedDBHostMsg_DatabaseCount_Params; 18 struct IndexedDBHostMsg_DatabaseCount_Params;
19 struct IndexedDBHostMsg_DatabaseCreateIndex_Params;
20 struct IndexedDBHostMsg_DatabaseCreateObjectStoreOld_Params;
19 struct IndexedDBHostMsg_DatabaseCreateObjectStore_Params; 21 struct IndexedDBHostMsg_DatabaseCreateObjectStore_Params;
20 struct IndexedDBHostMsg_DatabaseDeleteRange_Params; 22 struct IndexedDBHostMsg_DatabaseDeleteRange_Params;
21 struct IndexedDBHostMsg_DatabaseGet_Params; 23 struct IndexedDBHostMsg_DatabaseGet_Params;
22 struct IndexedDBHostMsg_DatabaseOpenCursor_Params; 24 struct IndexedDBHostMsg_DatabaseOpenCursor_Params;
23 struct IndexedDBHostMsg_DatabasePut_Params; 25 struct IndexedDBHostMsg_DatabasePut_Params;
24 struct IndexedDBHostMsg_DatabaseSetIndexKeys_Params; 26 struct IndexedDBHostMsg_DatabaseSetIndexKeys_Params;
25 struct IndexedDBHostMsg_FactoryDeleteDatabase_Params; 27 struct IndexedDBHostMsg_FactoryDeleteDatabase_Params;
26 struct IndexedDBHostMsg_FactoryGetDatabaseNames_Params; 28 struct IndexedDBHostMsg_FactoryGetDatabaseNames_Params;
27 struct IndexedDBHostMsg_FactoryOpen_Params; 29 struct IndexedDBHostMsg_FactoryOpen_Params;
28 struct IndexedDBHostMsg_IndexCount_Params; 30 struct IndexedDBHostMsg_IndexCount_Params;
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 class DatabaseDispatcherHost { 119 class DatabaseDispatcherHost {
118 public: 120 public:
119 explicit DatabaseDispatcherHost(IndexedDBDispatcherHost* parent); 121 explicit DatabaseDispatcherHost(IndexedDBDispatcherHost* parent);
120 ~DatabaseDispatcherHost(); 122 ~DatabaseDispatcherHost();
121 123
122 bool OnMessageReceived(const IPC::Message& message, bool *msg_is_ok); 124 bool OnMessageReceived(const IPC::Message& message, bool *msg_is_ok);
123 void Send(IPC::Message* message); 125 void Send(IPC::Message* message);
124 126
125 void OnMetadata(int32 ipc_database_id, 127 void OnMetadata(int32 ipc_database_id,
126 IndexedDBDatabaseMetadata* metadata); 128 IndexedDBDatabaseMetadata* metadata);
129 void OnCreateObjectStoreOld(
130 const IndexedDBHostMsg_DatabaseCreateObjectStoreOld_Params& params,
131 int32* object_store_id, WebKit::WebExceptionCode* ec);
127 void OnCreateObjectStore( 132 void OnCreateObjectStore(
128 const IndexedDBHostMsg_DatabaseCreateObjectStore_Params& params, 133 const IndexedDBHostMsg_DatabaseCreateObjectStore_Params& params);
129 int32* object_store_id, WebKit::WebExceptionCode* ec); 134 void OnDeleteObjectStoreOld(int32 ipc_database_id,
135 int64 object_store_id,
136 int32 ipc_transaction_id,
137 WebKit::WebExceptionCode* ec);
130 void OnDeleteObjectStore(int32 ipc_database_id, 138 void OnDeleteObjectStore(int32 ipc_database_id,
131 int64 object_store_id, 139 int64 transaction_id,
132 int32 ipc_transaction_id, 140 int64 object_store_id);
133 WebKit::WebExceptionCode* ec);
134 void OnCreateTransaction(int32 ipc_thread_id, 141 void OnCreateTransaction(int32 ipc_thread_id,
135 int32 ipc_database_id, 142 int32 ipc_database_id,
136 int64 transaction_id, 143 int64 transaction_id,
137 const std::vector<int64>& scope, 144 const std::vector<int64>& scope,
138 int32 mode, 145 int32 mode,
139 int32* ipc_transaction_id); 146 int32* ipc_transaction_id);
140 void OnOpen(int32 ipc_database_id, int32 ipc_thread_id, 147 void OnOpen(int32 ipc_database_id, int32 ipc_thread_id,
141 int32 ipc_response_id); 148 int32 ipc_response_id);
142 void OnClose(int32 ipc_database_id); 149 void OnClose(int32 ipc_database_id);
143 void OnDestroyed(int32 ipc_database_id); 150 void OnDestroyed(int32 ipc_database_id);
(...skipping 10 matching lines...) Expand all
154 void OnOpenCursor( 161 void OnOpenCursor(
155 const IndexedDBHostMsg_DatabaseOpenCursor_Params& params); 162 const IndexedDBHostMsg_DatabaseOpenCursor_Params& params);
156 void OnCount(const IndexedDBHostMsg_DatabaseCount_Params& params); 163 void OnCount(const IndexedDBHostMsg_DatabaseCount_Params& params);
157 void OnDeleteRange( 164 void OnDeleteRange(
158 const IndexedDBHostMsg_DatabaseDeleteRange_Params& params); 165 const IndexedDBHostMsg_DatabaseDeleteRange_Params& params);
159 void OnClear(int32 ipc_thread_id, 166 void OnClear(int32 ipc_thread_id,
160 int32 ipc_response_id, 167 int32 ipc_response_id,
161 int32 ipc_database_id, 168 int32 ipc_database_id,
162 int64 transaction_id, 169 int64 transaction_id,
163 int64 object_store_id); 170 int64 object_store_id);
171 void OnCreateIndex(
172 const IndexedDBHostMsg_DatabaseCreateIndex_Params& params);
173 void OnDeleteIndex(int32 ipc_database_id,
174 int64 transaction_id,
175 int64 object_store_id,
176 int64 index_id);
177
164 IndexedDBDispatcherHost* parent_; 178 IndexedDBDispatcherHost* parent_;
165 IDMap<WebKit::WebIDBDatabase, IDMapOwnPointer> map_; 179 IDMap<WebKit::WebIDBDatabase, IDMapOwnPointer> map_;
166 WebIDBObjectIDToURLMap database_url_map_; 180 WebIDBObjectIDToURLMap database_url_map_;
167 WebIDBTransactionIDToSizeMap transaction_size_map_; 181 WebIDBTransactionIDToSizeMap transaction_size_map_;
168 }; 182 };
169 183
170 class IndexDispatcherHost { 184 class IndexDispatcherHost {
171 public: 185 public:
172 explicit IndexDispatcherHost(IndexedDBDispatcherHost* parent); 186 explicit IndexDispatcherHost(IndexedDBDispatcherHost* parent);
173 ~IndexDispatcherHost(); 187 ~IndexDispatcherHost();
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
317 331
318 // Used to dispatch messages to the correct view host. 332 // Used to dispatch messages to the correct view host.
319 int ipc_process_id_; 333 int ipc_process_id_;
320 334
321 DISALLOW_IMPLICIT_CONSTRUCTORS(IndexedDBDispatcherHost); 335 DISALLOW_IMPLICIT_CONSTRUCTORS(IndexedDBDispatcherHost);
322 }; 336 };
323 337
324 } // namespace content 338 } // namespace content
325 339
326 #endif // CONTENT_BROWSER_IN_PROCESS_WEBKIT_INDEXED_DB_DISPATCHER_HOST_H_ 340 #endif // CONTENT_BROWSER_IN_PROCESS_WEBKIT_INDEXED_DB_DISPATCHER_HOST_H_
OLDNEW
« no previous file with comments | « no previous file | content/browser/in_process_webkit/indexed_db_dispatcher_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698