| 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/browser_message_filter.h" |   11 #include "content/browser/browser_message_filter.h" | 
|   12 #include "content/browser/in_process_webkit/webkit_context.h" |   12 #include "content/browser/in_process_webkit/webkit_context.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 class SerializedScriptValue; |   17 class SerializedScriptValue; | 
|   18 struct IndexedDBHostMsg_DatabaseCreateObjectStore_Params; |   18 struct IndexedDBHostMsg_DatabaseCreateObjectStore_Params; | 
 |   19 struct IndexedDBHostMsg_FactoryDatabaseNames_Params; | 
|   19 struct IndexedDBHostMsg_FactoryDeleteDatabase_Params; |   20 struct IndexedDBHostMsg_FactoryDeleteDatabase_Params; | 
|   20 struct IndexedDBHostMsg_FactoryOpen_Params; |   21 struct IndexedDBHostMsg_FactoryOpen_Params; | 
|   21 struct IndexedDBHostMsg_IndexOpenCursor_Params; |   22 struct IndexedDBHostMsg_IndexOpenCursor_Params; | 
|   22 struct IndexedDBHostMsg_ObjectStoreCreateIndex_Params; |   23 struct IndexedDBHostMsg_ObjectStoreCreateIndex_Params; | 
|   23 struct IndexedDBHostMsg_ObjectStoreOpenCursor_Params; |   24 struct IndexedDBHostMsg_ObjectStoreOpenCursor_Params; | 
|   24 struct IndexedDBHostMsg_ObjectStorePut_Params; |   25 struct IndexedDBHostMsg_ObjectStorePut_Params; | 
|   25  |   26  | 
|   26 namespace WebKit { |   27 namespace WebKit { | 
|   27 class WebIDBCursor; |   28 class WebIDBCursor; | 
|   28 class WebIDBDatabase; |   29 class WebIDBDatabase; | 
| (...skipping 28 matching lines...) Expand all  Loading... | 
|   57   int32 Add(WebKit::WebIDBDatabase* idb_database, const GURL& origin_url); |   58   int32 Add(WebKit::WebIDBDatabase* idb_database, const GURL& origin_url); | 
|   58   int32 Add(WebKit::WebIDBIndex* idb_index); |   59   int32 Add(WebKit::WebIDBIndex* idb_index); | 
|   59   int32 Add(WebKit::WebIDBObjectStore* idb_object_store); |   60   int32 Add(WebKit::WebIDBObjectStore* idb_object_store); | 
|   60   int32 Add(WebKit::WebIDBTransaction* idb_transaction, const GURL& origin_url); |   61   int32 Add(WebKit::WebIDBTransaction* idb_transaction, const GURL& origin_url); | 
|   61  |   62  | 
|   62  private: |   63  private: | 
|   63   virtual ~IndexedDBDispatcherHost(); |   64   virtual ~IndexedDBDispatcherHost(); | 
|   64  |   65  | 
|   65   // Message processing. Most of the work is delegated to the dispatcher hosts |   66   // Message processing. Most of the work is delegated to the dispatcher hosts | 
|   66   // below. |   67   // below. | 
 |   68   void OnIDBFactoryDatabaseNames( | 
 |   69       const IndexedDBHostMsg_FactoryDatabaseNames_Params& p, | 
 |   70       std::vector<string16>* database_names); | 
|   67   void OnIDBFactoryOpen(const IndexedDBHostMsg_FactoryOpen_Params& p); |   71   void OnIDBFactoryOpen(const IndexedDBHostMsg_FactoryOpen_Params& p); | 
|   68  |   72  | 
|   69   void OnIDBFactoryDeleteDatabase( |   73   void OnIDBFactoryDeleteDatabase( | 
|   70       const IndexedDBHostMsg_FactoryDeleteDatabase_Params& p); |   74       const IndexedDBHostMsg_FactoryDeleteDatabase_Params& p); | 
|   71  |   75  | 
|   72   void ResetDispatcherHosts(); |   76   void ResetDispatcherHosts(); | 
|   73  |   77  | 
|   74   // Helper templates. |   78   // Helper templates. | 
|   75   template <class ReturnType> |   79   template <class ReturnType> | 
|   76   ReturnType* GetOrTerminateProcess( |   80   ReturnType* GetOrTerminateProcess( | 
| (...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  271   scoped_ptr<CursorDispatcherHost> cursor_dispatcher_host_; |  275   scoped_ptr<CursorDispatcherHost> cursor_dispatcher_host_; | 
|  272   scoped_ptr<TransactionDispatcherHost> transaction_dispatcher_host_; |  276   scoped_ptr<TransactionDispatcherHost> transaction_dispatcher_host_; | 
|  273  |  277  | 
|  274   // Used to dispatch messages to the correct view host. |  278   // Used to dispatch messages to the correct view host. | 
|  275   int process_id_; |  279   int process_id_; | 
|  276  |  280  | 
|  277   DISALLOW_IMPLICIT_CONSTRUCTORS(IndexedDBDispatcherHost); |  281   DISALLOW_IMPLICIT_CONSTRUCTORS(IndexedDBDispatcherHost); | 
|  278 }; |  282 }; | 
|  279  |  283  | 
|  280 #endif  // CONTENT_BROWSER_IN_PROCESS_WEBKIT_INDEXED_DB_DISPATCHER_HOST_H_ |  284 #endif  // CONTENT_BROWSER_IN_PROCESS_WEBKIT_INDEXED_DB_DISPATCHER_HOST_H_ | 
| OLD | NEW |