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 class IndexedDBKey; | 18 class IndexedDBKey; |
| 19 class IndexedDBKeyPath; |
19 class IndexedDBKeyRange; | 20 class IndexedDBKeyRange; |
20 class NullableString16; | |
21 struct IndexedDBHostMsg_DatabaseCreateObjectStore_Params; | 21 struct IndexedDBHostMsg_DatabaseCreateObjectStore_Params; |
22 struct IndexedDBHostMsg_FactoryDeleteDatabase_Params; | 22 struct IndexedDBHostMsg_FactoryDeleteDatabase_Params; |
23 struct IndexedDBHostMsg_FactoryGetDatabaseNames_Params; | 23 struct IndexedDBHostMsg_FactoryGetDatabaseNames_Params; |
24 struct IndexedDBHostMsg_FactoryOpen_Params; | 24 struct IndexedDBHostMsg_FactoryOpen_Params; |
25 struct IndexedDBHostMsg_IndexCount_Params; | 25 struct IndexedDBHostMsg_IndexCount_Params; |
26 struct IndexedDBHostMsg_IndexOpenCursor_Params; | 26 struct IndexedDBHostMsg_IndexOpenCursor_Params; |
27 struct IndexedDBHostMsg_ObjectStoreCount_Params; | 27 struct IndexedDBHostMsg_ObjectStoreCount_Params; |
28 struct IndexedDBHostMsg_ObjectStoreCreateIndex_Params; | 28 struct IndexedDBHostMsg_ObjectStoreCreateIndex_Params; |
29 struct IndexedDBHostMsg_ObjectStoreOpenCursor_Params; | 29 struct IndexedDBHostMsg_ObjectStoreOpenCursor_Params; |
30 struct IndexedDBHostMsg_ObjectStorePut_Params; | 30 struct IndexedDBHostMsg_ObjectStorePut_Params; |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
149 class IndexDispatcherHost { | 149 class IndexDispatcherHost { |
150 public: | 150 public: |
151 explicit IndexDispatcherHost(IndexedDBDispatcherHost* parent); | 151 explicit IndexDispatcherHost(IndexedDBDispatcherHost* parent); |
152 ~IndexDispatcherHost(); | 152 ~IndexDispatcherHost(); |
153 | 153 |
154 bool OnMessageReceived(const IPC::Message& message, bool *msg_is_ok); | 154 bool OnMessageReceived(const IPC::Message& message, bool *msg_is_ok); |
155 void Send(IPC::Message* message); | 155 void Send(IPC::Message* message); |
156 | 156 |
157 void OnName(int32 idb_index_id, string16* name); | 157 void OnName(int32 idb_index_id, string16* name); |
158 void OnStoreName(int32 idb_index_id, string16* store_name); | 158 void OnStoreName(int32 idb_index_id, string16* store_name); |
159 void OnKeyPath(int32 idb_index_id, NullableString16* key_path); | 159 void OnKeyPath(int32 idb_index_id, IndexedDBKeyPath* key_path); |
160 void OnUnique(int32 idb_index_id, bool* unique); | 160 void OnUnique(int32 idb_index_id, bool* unique); |
161 void OnMultiEntry(int32 idb_index_id, bool* multi_entry); | 161 void OnMultiEntry(int32 idb_index_id, bool* multi_entry); |
162 void OnOpenObjectCursor( | 162 void OnOpenObjectCursor( |
163 const IndexedDBHostMsg_IndexOpenCursor_Params& params, | 163 const IndexedDBHostMsg_IndexOpenCursor_Params& params, |
164 WebKit::WebExceptionCode* ec); | 164 WebKit::WebExceptionCode* ec); |
165 void OnOpenKeyCursor(const IndexedDBHostMsg_IndexOpenCursor_Params& params, | 165 void OnOpenKeyCursor(const IndexedDBHostMsg_IndexOpenCursor_Params& params, |
166 WebKit::WebExceptionCode* ec); | 166 WebKit::WebExceptionCode* ec); |
167 void OnCount(const IndexedDBHostMsg_IndexCount_Params& params, | 167 void OnCount(const IndexedDBHostMsg_IndexCount_Params& params, |
168 WebKit::WebExceptionCode* ec); | 168 WebKit::WebExceptionCode* ec); |
169 void OnGetObject(int idb_index_id, | 169 void OnGetObject(int idb_index_id, |
(...skipping 28 matching lines...) Expand all Loading... |
198 | 198 |
199 class ObjectStoreDispatcherHost { | 199 class ObjectStoreDispatcherHost { |
200 public: | 200 public: |
201 explicit ObjectStoreDispatcherHost(IndexedDBDispatcherHost* parent); | 201 explicit ObjectStoreDispatcherHost(IndexedDBDispatcherHost* parent); |
202 ~ObjectStoreDispatcherHost(); | 202 ~ObjectStoreDispatcherHost(); |
203 | 203 |
204 bool OnMessageReceived(const IPC::Message& message, bool *msg_is_ok); | 204 bool OnMessageReceived(const IPC::Message& message, bool *msg_is_ok); |
205 void Send(IPC::Message* message); | 205 void Send(IPC::Message* message); |
206 | 206 |
207 void OnName(int32 idb_object_store_id, string16* name); | 207 void OnName(int32 idb_object_store_id, string16* name); |
208 void OnKeyPath(int32 idb_object_store_id, NullableString16* keyPath); | 208 void OnKeyPath(int32 idb_object_store_id, IndexedDBKeyPath* keyPath); |
209 void OnIndexNames(int32 idb_object_store_id, | 209 void OnIndexNames(int32 idb_object_store_id, |
210 std::vector<string16>* index_names); | 210 std::vector<string16>* index_names); |
211 void OnGet(int idb_object_store_id, | 211 void OnGet(int idb_object_store_id, |
212 int32 thread_id, | 212 int32 thread_id, |
213 int32 response_id, | 213 int32 response_id, |
214 const IndexedDBKey& key, | 214 const IndexedDBKey& key, |
215 int32 transaction_id, | 215 int32 transaction_id, |
216 WebKit::WebExceptionCode* ec); | 216 WebKit::WebExceptionCode* ec); |
217 void OnGetByRange(int idb_object_store_id, | 217 void OnGetByRange(int idb_object_store_id, |
218 int32 thread_id, | 218 int32 thread_id, |
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
336 scoped_ptr<CursorDispatcherHost> cursor_dispatcher_host_; | 336 scoped_ptr<CursorDispatcherHost> cursor_dispatcher_host_; |
337 scoped_ptr<TransactionDispatcherHost> transaction_dispatcher_host_; | 337 scoped_ptr<TransactionDispatcherHost> transaction_dispatcher_host_; |
338 | 338 |
339 // Used to dispatch messages to the correct view host. | 339 // Used to dispatch messages to the correct view host. |
340 int process_id_; | 340 int process_id_; |
341 | 341 |
342 DISALLOW_IMPLICIT_CONSTRUCTORS(IndexedDBDispatcherHost); | 342 DISALLOW_IMPLICIT_CONSTRUCTORS(IndexedDBDispatcherHost); |
343 }; | 343 }; |
344 | 344 |
345 #endif // CONTENT_BROWSER_IN_PROCESS_WEBKIT_INDEXED_DB_DISPATCHER_HOST_H_ | 345 #endif // CONTENT_BROWSER_IN_PROCESS_WEBKIT_INDEXED_DB_DISPATCHER_HOST_H_ |
OLD | NEW |