| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "base/id_map.h" | 10 #include "base/id_map.h" |
| 11 #include "content/browser/in_process_webkit/webkit_context.h" | 11 #include "content/browser/in_process_webkit/webkit_context.h" |
| 12 #include "content/public/browser/browser_message_filter.h" | 12 #include "content/public/browser/browser_message_filter.h" |
| 13 #include "third_party/WebKit/Source/WebKit/chromium/public/WebExceptionCode.h" | 13 #include "third_party/WebKit/Source/WebKit/chromium/public/WebExceptionCode.h" |
| 14 | 14 |
| 15 class IndexedDBKey; | 15 class IndexedDBKey; |
| 16 class NullableString16; | 16 class NullableString16; |
| 17 struct IndexedDBHostMsg_DatabaseCreateObjectStore_Params; | 17 struct IndexedDBHostMsg_DatabaseCreateObjectStore_Params; |
| 18 struct IndexedDBHostMsg_FactoryDeleteDatabase_Params; |
| 18 struct IndexedDBHostMsg_FactoryGetDatabaseNames_Params; | 19 struct IndexedDBHostMsg_FactoryGetDatabaseNames_Params; |
| 19 struct IndexedDBHostMsg_FactoryDeleteDatabase_Params; | |
| 20 struct IndexedDBHostMsg_FactoryOpen_Params; | 20 struct IndexedDBHostMsg_FactoryOpen_Params; |
| 21 struct IndexedDBHostMsg_IndexCount_Params; |
| 21 struct IndexedDBHostMsg_IndexOpenCursor_Params; | 22 struct IndexedDBHostMsg_IndexOpenCursor_Params; |
| 23 struct IndexedDBHostMsg_ObjectStoreCount_Params; |
| 22 struct IndexedDBHostMsg_ObjectStoreCreateIndex_Params; | 24 struct IndexedDBHostMsg_ObjectStoreCreateIndex_Params; |
| 23 struct IndexedDBHostMsg_ObjectStoreOpenCursor_Params; | 25 struct IndexedDBHostMsg_ObjectStoreOpenCursor_Params; |
| 24 struct IndexedDBHostMsg_ObjectStorePut_Params; | 26 struct IndexedDBHostMsg_ObjectStorePut_Params; |
| 25 | 27 |
| 26 namespace WebKit { | 28 namespace WebKit { |
| 27 class WebDOMStringList; | 29 class WebDOMStringList; |
| 28 class WebIDBCursor; | 30 class WebIDBCursor; |
| 29 class WebIDBDatabase; | 31 class WebIDBDatabase; |
| 30 class WebIDBIndex; | 32 class WebIDBIndex; |
| 31 class WebIDBObjectStore; | 33 class WebIDBObjectStore; |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 151 | 153 |
| 152 void OnName(int32 idb_index_id, string16* name); | 154 void OnName(int32 idb_index_id, string16* name); |
| 153 void OnStoreName(int32 idb_index_id, string16* store_name); | 155 void OnStoreName(int32 idb_index_id, string16* store_name); |
| 154 void OnKeyPath(int32 idb_index_id, NullableString16* key_path); | 156 void OnKeyPath(int32 idb_index_id, NullableString16* key_path); |
| 155 void OnUnique(int32 idb_index_id, bool* unique); | 157 void OnUnique(int32 idb_index_id, bool* unique); |
| 156 void OnOpenObjectCursor( | 158 void OnOpenObjectCursor( |
| 157 const IndexedDBHostMsg_IndexOpenCursor_Params& params, | 159 const IndexedDBHostMsg_IndexOpenCursor_Params& params, |
| 158 WebKit::WebExceptionCode* ec); | 160 WebKit::WebExceptionCode* ec); |
| 159 void OnOpenKeyCursor(const IndexedDBHostMsg_IndexOpenCursor_Params& params, | 161 void OnOpenKeyCursor(const IndexedDBHostMsg_IndexOpenCursor_Params& params, |
| 160 WebKit::WebExceptionCode* ec); | 162 WebKit::WebExceptionCode* ec); |
| 163 void OnCount(const IndexedDBHostMsg_IndexCount_Params& params, |
| 164 WebKit::WebExceptionCode* ec); |
| 161 void OnGetObject(int idb_index_id, | 165 void OnGetObject(int idb_index_id, |
| 162 int32 thread_id, | 166 int32 thread_id, |
| 163 int32 response_id, | 167 int32 response_id, |
| 164 const IndexedDBKey& key, | 168 const IndexedDBKey& key, |
| 165 int32 transaction_id, | 169 int32 transaction_id, |
| 166 WebKit::WebExceptionCode* ec); | 170 WebKit::WebExceptionCode* ec); |
| 167 void OnGetKey(int idb_index_id, | 171 void OnGetKey(int idb_index_id, |
| 168 int32 thread_id, | 172 int32 thread_id, |
| 169 int32 response_id, | 173 int32 response_id, |
| 170 const IndexedDBKey& key, | 174 const IndexedDBKey& key, |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 215 const string16& name, | 219 const string16& name, |
| 216 int32* idb_index_id, | 220 int32* idb_index_id, |
| 217 WebKit::WebExceptionCode* ec); | 221 WebKit::WebExceptionCode* ec); |
| 218 void OnDeleteIndex(int32 idb_object_store_id, | 222 void OnDeleteIndex(int32 idb_object_store_id, |
| 219 const string16& name, | 223 const string16& name, |
| 220 int32 transaction_id, | 224 int32 transaction_id, |
| 221 WebKit::WebExceptionCode* ec); | 225 WebKit::WebExceptionCode* ec); |
| 222 void OnOpenCursor( | 226 void OnOpenCursor( |
| 223 const IndexedDBHostMsg_ObjectStoreOpenCursor_Params& params, | 227 const IndexedDBHostMsg_ObjectStoreOpenCursor_Params& params, |
| 224 WebKit::WebExceptionCode* ec); | 228 WebKit::WebExceptionCode* ec); |
| 229 void OnCount(const IndexedDBHostMsg_ObjectStoreCount_Params& params, |
| 230 WebKit::WebExceptionCode* ec); |
| 225 void OnDestroyed(int32 idb_object_store_id); | 231 void OnDestroyed(int32 idb_object_store_id); |
| 226 | 232 |
| 227 IndexedDBDispatcherHost* parent_; | 233 IndexedDBDispatcherHost* parent_; |
| 228 IDMap<WebKit::WebIDBObjectStore, IDMapOwnPointer> map_; | 234 IDMap<WebKit::WebIDBObjectStore, IDMapOwnPointer> map_; |
| 229 }; | 235 }; |
| 230 | 236 |
| 231 class CursorDispatcherHost { | 237 class CursorDispatcherHost { |
| 232 public: | 238 public: |
| 233 explicit CursorDispatcherHost(IndexedDBDispatcherHost* parent); | 239 explicit CursorDispatcherHost(IndexedDBDispatcherHost* parent); |
| 234 ~CursorDispatcherHost(); | 240 ~CursorDispatcherHost(); |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 303 scoped_ptr<CursorDispatcherHost> cursor_dispatcher_host_; | 309 scoped_ptr<CursorDispatcherHost> cursor_dispatcher_host_; |
| 304 scoped_ptr<TransactionDispatcherHost> transaction_dispatcher_host_; | 310 scoped_ptr<TransactionDispatcherHost> transaction_dispatcher_host_; |
| 305 | 311 |
| 306 // Used to dispatch messages to the correct view host. | 312 // Used to dispatch messages to the correct view host. |
| 307 int process_id_; | 313 int process_id_; |
| 308 | 314 |
| 309 DISALLOW_IMPLICIT_CONSTRUCTORS(IndexedDBDispatcherHost); | 315 DISALLOW_IMPLICIT_CONSTRUCTORS(IndexedDBDispatcherHost); |
| 310 }; | 316 }; |
| 311 | 317 |
| 312 #endif // CONTENT_BROWSER_IN_PROCESS_WEBKIT_INDEXED_DB_DISPATCHER_HOST_H_ | 318 #endif // CONTENT_BROWSER_IN_PROCESS_WEBKIT_INDEXED_DB_DISPATCHER_HOST_H_ |
| OLD | NEW |