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_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 <map> | 9 #include <map> |
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 class IndexedDBContextImpl; | 17 class IndexedDBContextImpl; |
| 18 struct IndexedDBDatabaseMetadata; |
18 struct IndexedDBHostMsg_DatabaseCreateObjectStore_Params; | 19 struct IndexedDBHostMsg_DatabaseCreateObjectStore_Params; |
19 struct IndexedDBHostMsg_FactoryDeleteDatabase_Params; | 20 struct IndexedDBHostMsg_FactoryDeleteDatabase_Params; |
20 struct IndexedDBHostMsg_FactoryGetDatabaseNames_Params; | 21 struct IndexedDBHostMsg_FactoryGetDatabaseNames_Params; |
21 struct IndexedDBHostMsg_FactoryOpen_Params; | 22 struct IndexedDBHostMsg_FactoryOpen_Params; |
22 struct IndexedDBHostMsg_IndexCount_Params; | 23 struct IndexedDBHostMsg_IndexCount_Params; |
23 struct IndexedDBHostMsg_IndexOpenCursor_Params; | 24 struct IndexedDBHostMsg_IndexOpenCursor_Params; |
24 struct IndexedDBHostMsg_ObjectStoreCount_Params; | 25 struct IndexedDBHostMsg_ObjectStoreCount_Params; |
25 struct IndexedDBHostMsg_ObjectStoreCreateIndex_Params; | 26 struct IndexedDBHostMsg_ObjectStoreCreateIndex_Params; |
26 struct IndexedDBHostMsg_ObjectStoreOpenCursor_Params; | 27 struct IndexedDBHostMsg_ObjectStoreOpenCursor_Params; |
27 struct IndexedDBHostMsg_ObjectStorePut_Params; | 28 struct IndexedDBHostMsg_ObjectStorePut_Params; |
28 | 29 |
29 namespace WebKit { | 30 namespace WebKit { |
30 class WebDOMStringList; | 31 class WebDOMStringList; |
31 class WebIDBCursor; | 32 class WebIDBCursor; |
32 class WebIDBDatabase; | 33 class WebIDBDatabase; |
33 class WebIDBIndex; | 34 class WebIDBIndex; |
34 class WebIDBObjectStore; | 35 class WebIDBObjectStore; |
35 class WebIDBTransaction; | 36 class WebIDBTransaction; |
| 37 struct WebIDBMetadata; |
36 } | 38 } |
37 | 39 |
38 namespace content { | 40 namespace content { |
39 class IndexedDBKey; | 41 class IndexedDBKey; |
40 class IndexedDBKeyPath; | 42 class IndexedDBKeyPath; |
41 class IndexedDBKeyRange; | 43 class IndexedDBKeyRange; |
42 class SerializedScriptValue; | 44 class SerializedScriptValue; |
43 } | 45 } |
44 | 46 |
45 // Handles all IndexedDB related messages from a particular renderer process. | 47 // Handles all IndexedDB related messages from a particular renderer process. |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 typedef std::map<int32, int64> WebIDBTransactionIDToSizeMap; | 110 typedef std::map<int32, int64> WebIDBTransactionIDToSizeMap; |
109 | 111 |
110 class DatabaseDispatcherHost { | 112 class DatabaseDispatcherHost { |
111 public: | 113 public: |
112 explicit DatabaseDispatcherHost(IndexedDBDispatcherHost* parent); | 114 explicit DatabaseDispatcherHost(IndexedDBDispatcherHost* parent); |
113 ~DatabaseDispatcherHost(); | 115 ~DatabaseDispatcherHost(); |
114 | 116 |
115 bool OnMessageReceived(const IPC::Message& message, bool *msg_is_ok); | 117 bool OnMessageReceived(const IPC::Message& message, bool *msg_is_ok); |
116 void Send(IPC::Message* message); | 118 void Send(IPC::Message* message); |
117 | 119 |
| 120 void OnMetadata(int32 idb_database_id, |
| 121 IndexedDBDatabaseMetadata* metadata); |
118 void OnName(int32 idb_database_id, string16* name); | 122 void OnName(int32 idb_database_id, string16* name); |
119 void OnVersion(int32 idb_database_id, string16* version); | 123 void OnVersion(int32 idb_database_id, string16* version); |
120 void OnObjectStoreNames(int32 idb_database_id, | 124 void OnObjectStoreNames(int32 idb_database_id, |
121 std::vector<string16>* object_stores); | 125 std::vector<string16>* object_stores); |
122 void OnCreateObjectStore( | 126 void OnCreateObjectStore( |
123 const IndexedDBHostMsg_DatabaseCreateObjectStore_Params& params, | 127 const IndexedDBHostMsg_DatabaseCreateObjectStore_Params& params, |
124 int32* object_store_id, WebKit::WebExceptionCode* ec); | 128 int32* object_store_id, WebKit::WebExceptionCode* ec); |
125 void OnDeleteObjectStore(int32 idb_database_id, | 129 void OnDeleteObjectStore(int32 idb_database_id, |
126 const string16& name, | 130 const string16& name, |
127 int32 transaction_id, | 131 int32 transaction_id, |
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
326 scoped_ptr<CursorDispatcherHost> cursor_dispatcher_host_; | 330 scoped_ptr<CursorDispatcherHost> cursor_dispatcher_host_; |
327 scoped_ptr<TransactionDispatcherHost> transaction_dispatcher_host_; | 331 scoped_ptr<TransactionDispatcherHost> transaction_dispatcher_host_; |
328 | 332 |
329 // Used to dispatch messages to the correct view host. | 333 // Used to dispatch messages to the correct view host. |
330 int process_id_; | 334 int process_id_; |
331 | 335 |
332 DISALLOW_IMPLICIT_CONSTRUCTORS(IndexedDBDispatcherHost); | 336 DISALLOW_IMPLICIT_CONSTRUCTORS(IndexedDBDispatcherHost); |
333 }; | 337 }; |
334 | 338 |
335 #endif // CONTENT_BROWSER_IN_PROCESS_WEBKIT_INDEXED_DB_DISPATCHER_HOST_H_ | 339 #endif // CONTENT_BROWSER_IN_PROCESS_WEBKIT_INDEXED_DB_DISPATCHER_HOST_H_ |
OLD | NEW |