| OLD | NEW |
| 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_INDEXED_DB_INDEXED_DB_DISPATCHER_HOST_H_ | 5 #ifndef CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_DISPATCHER_HOST_H_ |
| 6 #define CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_DISPATCHER_HOST_H_ | 6 #define CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_DISPATCHER_HOST_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 109 // Message processing. Most of the work is delegated to the dispatcher hosts | 109 // Message processing. Most of the work is delegated to the dispatcher hosts |
| 110 // below. | 110 // below. |
| 111 void OnIDBFactoryGetDatabaseNames( | 111 void OnIDBFactoryGetDatabaseNames( |
| 112 const IndexedDBHostMsg_FactoryGetDatabaseNames_Params& p); | 112 const IndexedDBHostMsg_FactoryGetDatabaseNames_Params& p); |
| 113 void OnIDBFactoryOpen(const IndexedDBHostMsg_FactoryOpen_Params& p); | 113 void OnIDBFactoryOpen(const IndexedDBHostMsg_FactoryOpen_Params& p); |
| 114 | 114 |
| 115 void OnIDBFactoryDeleteDatabase( | 115 void OnIDBFactoryDeleteDatabase( |
| 116 const IndexedDBHostMsg_FactoryDeleteDatabase_Params& p); | 116 const IndexedDBHostMsg_FactoryDeleteDatabase_Params& p); |
| 117 | 117 |
| 118 void OnAckReceivedBlobs(const std::vector<std::string>& uuids); | 118 void OnAckReceivedBlobs(const std::vector<std::string>& uuids); |
| 119 void OnPutHelper(const IndexedDBHostMsg_DatabasePut_Params& params, |
| 120 std::vector<webkit_blob::BlobDataHandle*> handles); |
| 119 | 121 |
| 120 void ResetDispatcherHosts(); | 122 void ResetDispatcherHosts(); |
| 121 | 123 |
| 122 // IDMap for RefCounted types | 124 // IDMap for RefCounted types |
| 123 template <typename RefCountedType> | 125 template <typename RefCountedType> |
| 124 class RefIDMap { | 126 class RefIDMap { |
| 125 private: | 127 private: |
| 126 typedef int32 KeyType; | 128 typedef int32 KeyType; |
| 127 | 129 |
| 128 public: | 130 public: |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 180 const IndexedDBHostMsg_DatabaseCreateObjectStore_Params& params); | 182 const IndexedDBHostMsg_DatabaseCreateObjectStore_Params& params); |
| 181 void OnDeleteObjectStore(int32 ipc_database_id, | 183 void OnDeleteObjectStore(int32 ipc_database_id, |
| 182 int64 transaction_id, | 184 int64 transaction_id, |
| 183 int64 object_store_id); | 185 int64 object_store_id); |
| 184 void OnCreateTransaction( | 186 void OnCreateTransaction( |
| 185 const IndexedDBHostMsg_DatabaseCreateTransaction_Params&); | 187 const IndexedDBHostMsg_DatabaseCreateTransaction_Params&); |
| 186 void OnClose(int32 ipc_database_id); | 188 void OnClose(int32 ipc_database_id); |
| 187 void OnDestroyed(int32 ipc_database_id); | 189 void OnDestroyed(int32 ipc_database_id); |
| 188 | 190 |
| 189 void OnGet(const IndexedDBHostMsg_DatabaseGet_Params& params); | 191 void OnGet(const IndexedDBHostMsg_DatabaseGet_Params& params); |
| 190 void OnPut(const IndexedDBHostMsg_DatabasePut_Params& params); | 192 // OnPutWrapper starts on the IO thread so that it can grab BlobDataHandles |
| 193 // before posting to the IDB TaskRunner for the rest of the job. |
| 194 void OnPutWrapper(const IndexedDBHostMsg_DatabasePut_Params& params); |
| 195 void OnPut(const IndexedDBHostMsg_DatabasePut_Params& params, |
| 196 std::vector<webkit_blob::BlobDataHandle*> handles); |
| 191 void OnSetIndexKeys( | 197 void OnSetIndexKeys( |
| 192 const IndexedDBHostMsg_DatabaseSetIndexKeys_Params& params); | 198 const IndexedDBHostMsg_DatabaseSetIndexKeys_Params& params); |
| 193 void OnSetIndexesReady(int32 ipc_database_id, | 199 void OnSetIndexesReady(int32 ipc_database_id, |
| 194 int64 transaction_id, | 200 int64 transaction_id, |
| 195 int64 object_store_id, | 201 int64 object_store_id, |
| 196 const std::vector<int64>& ids); | 202 const std::vector<int64>& ids); |
| 197 void OnOpenCursor(const IndexedDBHostMsg_DatabaseOpenCursor_Params& params); | 203 void OnOpenCursor(const IndexedDBHostMsg_DatabaseOpenCursor_Params& params); |
| 198 void OnCount(const IndexedDBHostMsg_DatabaseCount_Params& params); | 204 void OnCount(const IndexedDBHostMsg_DatabaseCount_Params& params); |
| 199 void OnDeleteRange( | 205 void OnDeleteRange( |
| 200 const IndexedDBHostMsg_DatabaseDeleteRange_Params& params); | 206 const IndexedDBHostMsg_DatabaseDeleteRange_Params& params); |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 265 | 271 |
| 266 // Used to set file permissions for blob storage. | 272 // Used to set file permissions for blob storage. |
| 267 int ipc_process_id_; | 273 int ipc_process_id_; |
| 268 | 274 |
| 269 DISALLOW_IMPLICIT_CONSTRUCTORS(IndexedDBDispatcherHost); | 275 DISALLOW_IMPLICIT_CONSTRUCTORS(IndexedDBDispatcherHost); |
| 270 }; | 276 }; |
| 271 | 277 |
| 272 } // namespace content | 278 } // namespace content |
| 273 | 279 |
| 274 #endif // CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_DISPATCHER_HOST_H_ | 280 #endif // CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_DISPATCHER_HOST_H_ |
| OLD | NEW |