| 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 16 matching lines...) Expand all Loading... |
| 186 | 186 |
| 187 class ObjectStoreDispatcherHost { | 187 class ObjectStoreDispatcherHost { |
| 188 public: | 188 public: |
| 189 explicit ObjectStoreDispatcherHost(IndexedDBDispatcherHost* parent); | 189 explicit ObjectStoreDispatcherHost(IndexedDBDispatcherHost* parent); |
| 190 ~ObjectStoreDispatcherHost(); | 190 ~ObjectStoreDispatcherHost(); |
| 191 | 191 |
| 192 bool OnMessageReceived(const IPC::Message& message, bool *msg_is_ok); | 192 bool OnMessageReceived(const IPC::Message& message, bool *msg_is_ok); |
| 193 void Send(IPC::Message* message); | 193 void Send(IPC::Message* message); |
| 194 | 194 |
| 195 void OnName(int32 idb_object_store_id, string16* name); | 195 void OnName(int32 idb_object_store_id, string16* name); |
| 196 void OnKeyPath(int32 idb_object_store_id, NullableString16* keyPath); | 196 void OnKeyPath(int32 idb_object_store_id, IndexedDBKeyPath* keyPath); |
| 197 void OnIndexNames(int32 idb_object_store_id, | 197 void OnIndexNames(int32 idb_object_store_id, |
| 198 std::vector<string16>* index_names); | 198 std::vector<string16>* index_names); |
| 199 void OnGet(int idb_object_store_id, | 199 void OnGet(int idb_object_store_id, |
| 200 int32 thread_id, | 200 int32 thread_id, |
| 201 int32 response_id, | 201 int32 response_id, |
| 202 const IndexedDBKeyRange& key_range, | 202 const IndexedDBKeyRange& key_range, |
| 203 int32 transaction_id, | 203 int32 transaction_id, |
| 204 WebKit::WebExceptionCode* ec); | 204 WebKit::WebExceptionCode* ec); |
| 205 void OnPut(const IndexedDBHostMsg_ObjectStorePut_Params& params, | 205 void OnPut(const IndexedDBHostMsg_ObjectStorePut_Params& params, |
| 206 WebKit::WebExceptionCode* ec); | 206 WebKit::WebExceptionCode* ec); |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 323 scoped_ptr<CursorDispatcherHost> cursor_dispatcher_host_; | 323 scoped_ptr<CursorDispatcherHost> cursor_dispatcher_host_; |
| 324 scoped_ptr<TransactionDispatcherHost> transaction_dispatcher_host_; | 324 scoped_ptr<TransactionDispatcherHost> transaction_dispatcher_host_; |
| 325 | 325 |
| 326 // Used to dispatch messages to the correct view host. | 326 // Used to dispatch messages to the correct view host. |
| 327 int process_id_; | 327 int process_id_; |
| 328 | 328 |
| 329 DISALLOW_IMPLICIT_CONSTRUCTORS(IndexedDBDispatcherHost); | 329 DISALLOW_IMPLICIT_CONSTRUCTORS(IndexedDBDispatcherHost); |
| 330 }; | 330 }; |
| 331 | 331 |
| 332 #endif // CONTENT_BROWSER_IN_PROCESS_WEBKIT_INDEXED_DB_DISPATCHER_HOST_H_ | 332 #endif // CONTENT_BROWSER_IN_PROCESS_WEBKIT_INDEXED_DB_DISPATCHER_HOST_H_ |
| OLD | NEW |