| 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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 | 55 |
| 56 static ::IndexedDBDatabaseMetadata ConvertMetadata( | 56 static ::IndexedDBDatabaseMetadata ConvertMetadata( |
| 57 const content::IndexedDBDatabaseMetadata& metadata); | 57 const content::IndexedDBDatabaseMetadata& metadata); |
| 58 | 58 |
| 59 // BrowserMessageFilter implementation. | 59 // BrowserMessageFilter implementation. |
| 60 virtual void OnChannelConnected(int32 peer_pid) OVERRIDE; | 60 virtual void OnChannelConnected(int32 peer_pid) OVERRIDE; |
| 61 virtual void OnChannelClosing() OVERRIDE; | 61 virtual void OnChannelClosing() OVERRIDE; |
| 62 virtual void OnDestruct() const OVERRIDE; | 62 virtual void OnDestruct() const OVERRIDE; |
| 63 virtual base::TaskRunner* OverrideTaskRunnerForMessage( | 63 virtual base::TaskRunner* OverrideTaskRunnerForMessage( |
| 64 const IPC::Message& message) OVERRIDE; | 64 const IPC::Message& message) OVERRIDE; |
| 65 virtual bool OnMessageReceived(const IPC::Message& message, | 65 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; |
| 66 bool* message_was_ok) OVERRIDE; | |
| 67 | 66 |
| 68 void FinishTransaction(int64 host_transaction_id, bool committed); | 67 void FinishTransaction(int64 host_transaction_id, bool committed); |
| 69 | 68 |
| 70 // A shortcut for accessing our context. | 69 // A shortcut for accessing our context. |
| 71 IndexedDBContextImpl* Context() { return indexed_db_context_; } | 70 IndexedDBContextImpl* Context() { return indexed_db_context_; } |
| 72 webkit_blob::BlobStorageContext* blob_storage_context() const { | 71 webkit_blob::BlobStorageContext* blob_storage_context() const { |
| 73 return blob_storage_context_->context(); | 72 return blob_storage_context_->context(); |
| 74 } | 73 } |
| 75 | 74 |
| 76 // IndexedDBCallbacks call these methods to add the results into the | 75 // IndexedDBCallbacks call these methods to add the results into the |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 169 typedef std::map<int64, GURL> TransactionIDToURLMap; | 168 typedef std::map<int64, GURL> TransactionIDToURLMap; |
| 170 typedef std::map<int64, uint64> TransactionIDToSizeMap; | 169 typedef std::map<int64, uint64> TransactionIDToSizeMap; |
| 171 typedef std::map<int64, int64> TransactionIDToDatabaseIDMap; | 170 typedef std::map<int64, int64> TransactionIDToDatabaseIDMap; |
| 172 | 171 |
| 173 class DatabaseDispatcherHost { | 172 class DatabaseDispatcherHost { |
| 174 public: | 173 public: |
| 175 explicit DatabaseDispatcherHost(IndexedDBDispatcherHost* parent); | 174 explicit DatabaseDispatcherHost(IndexedDBDispatcherHost* parent); |
| 176 ~DatabaseDispatcherHost(); | 175 ~DatabaseDispatcherHost(); |
| 177 | 176 |
| 178 void CloseAll(); | 177 void CloseAll(); |
| 179 bool OnMessageReceived(const IPC::Message& message, bool* msg_is_ok); | 178 bool OnMessageReceived(const IPC::Message& message); |
| 180 | 179 |
| 181 void OnCreateObjectStore( | 180 void OnCreateObjectStore( |
| 182 const IndexedDBHostMsg_DatabaseCreateObjectStore_Params& params); | 181 const IndexedDBHostMsg_DatabaseCreateObjectStore_Params& params); |
| 183 void OnDeleteObjectStore(int32 ipc_database_id, | 182 void OnDeleteObjectStore(int32 ipc_database_id, |
| 184 int64 transaction_id, | 183 int64 transaction_id, |
| 185 int64 object_store_id); | 184 int64 object_store_id); |
| 186 void OnCreateTransaction( | 185 void OnCreateTransaction( |
| 187 const IndexedDBHostMsg_DatabaseCreateTransaction_Params&); | 186 const IndexedDBHostMsg_DatabaseCreateTransaction_Params&); |
| 188 void OnClose(int32 ipc_database_id); | 187 void OnClose(int32 ipc_database_id); |
| 189 void OnDestroyed(int32 ipc_database_id); | 188 void OnDestroyed(int32 ipc_database_id); |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 224 TransactionIDToSizeMap transaction_size_map_; | 223 TransactionIDToSizeMap transaction_size_map_; |
| 225 TransactionIDToURLMap transaction_url_map_; | 224 TransactionIDToURLMap transaction_url_map_; |
| 226 TransactionIDToDatabaseIDMap transaction_database_map_; | 225 TransactionIDToDatabaseIDMap transaction_database_map_; |
| 227 }; | 226 }; |
| 228 | 227 |
| 229 class CursorDispatcherHost { | 228 class CursorDispatcherHost { |
| 230 public: | 229 public: |
| 231 explicit CursorDispatcherHost(IndexedDBDispatcherHost* parent); | 230 explicit CursorDispatcherHost(IndexedDBDispatcherHost* parent); |
| 232 ~CursorDispatcherHost(); | 231 ~CursorDispatcherHost(); |
| 233 | 232 |
| 234 bool OnMessageReceived(const IPC::Message& message, bool* msg_is_ok); | 233 bool OnMessageReceived(const IPC::Message& message); |
| 235 | 234 |
| 236 void OnAdvance(int32 ipc_object_store_id, | 235 void OnAdvance(int32 ipc_object_store_id, |
| 237 int32 ipc_thread_id, | 236 int32 ipc_thread_id, |
| 238 int32 ipc_callbacks_id, | 237 int32 ipc_callbacks_id, |
| 239 unsigned long count); | 238 unsigned long count); |
| 240 void OnContinue(int32 ipc_object_store_id, | 239 void OnContinue(int32 ipc_object_store_id, |
| 241 int32 ipc_thread_id, | 240 int32 ipc_thread_id, |
| 242 int32 ipc_callbacks_id, | 241 int32 ipc_callbacks_id, |
| 243 const IndexedDBKey& key, | 242 const IndexedDBKey& key, |
| 244 const IndexedDBKey& primary_key); | 243 const IndexedDBKey& primary_key); |
| (...skipping 26 matching lines...) Expand all Loading... |
| 271 | 270 |
| 272 // Used to set file permissions for blob storage. | 271 // Used to set file permissions for blob storage. |
| 273 int ipc_process_id_; | 272 int ipc_process_id_; |
| 274 | 273 |
| 275 DISALLOW_IMPLICIT_CONSTRUCTORS(IndexedDBDispatcherHost); | 274 DISALLOW_IMPLICIT_CONSTRUCTORS(IndexedDBDispatcherHost); |
| 276 }; | 275 }; |
| 277 | 276 |
| 278 } // namespace content | 277 } // namespace content |
| 279 | 278 |
| 280 #endif // CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_DISPATCHER_HOST_H_ | 279 #endif // CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_DISPATCHER_HOST_H_ |
| OLD | NEW |