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 |
(...skipping 21 matching lines...) Expand all Loading... | |
32 class WebIDBDatabase; | 32 class WebIDBDatabase; |
33 class WebIDBIndex; | 33 class WebIDBIndex; |
34 class WebIDBObjectStore; | 34 class WebIDBObjectStore; |
35 class WebIDBTransaction; | 35 class WebIDBTransaction; |
36 } | 36 } |
37 | 37 |
38 namespace content { | 38 namespace content { |
39 class IndexedDBKey; | 39 class IndexedDBKey; |
40 class IndexedDBKeyPath; | 40 class IndexedDBKeyPath; |
41 class IndexedDBKeyRange; | 41 class IndexedDBKeyRange; |
42 class IndexedDBDatabaseMetadata; | |
42 class SerializedScriptValue; | 43 class SerializedScriptValue; |
43 } | 44 } |
44 | 45 |
45 // Handles all IndexedDB related messages from a particular renderer process. | 46 // Handles all IndexedDB related messages from a particular renderer process. |
46 class IndexedDBDispatcherHost : public content::BrowserMessageFilter { | 47 class IndexedDBDispatcherHost : public content::BrowserMessageFilter { |
47 public: | 48 public: |
48 // Only call the constructor from the UI thread. | 49 // Only call the constructor from the UI thread. |
49 IndexedDBDispatcherHost(int process_id, | 50 IndexedDBDispatcherHost(int process_id, |
50 IndexedDBContextImpl* indexed_db_context); | 51 IndexedDBContextImpl* indexed_db_context); |
51 | 52 |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
108 typedef std::map<int32, int64> WebIDBTransactionIDToSizeMap; | 109 typedef std::map<int32, int64> WebIDBTransactionIDToSizeMap; |
109 | 110 |
110 class DatabaseDispatcherHost { | 111 class DatabaseDispatcherHost { |
111 public: | 112 public: |
112 explicit DatabaseDispatcherHost(IndexedDBDispatcherHost* parent); | 113 explicit DatabaseDispatcherHost(IndexedDBDispatcherHost* parent); |
113 ~DatabaseDispatcherHost(); | 114 ~DatabaseDispatcherHost(); |
114 | 115 |
115 bool OnMessageReceived(const IPC::Message& message, bool *msg_is_ok); | 116 bool OnMessageReceived(const IPC::Message& message, bool *msg_is_ok); |
116 void Send(IPC::Message* message); | 117 void Send(IPC::Message* message); |
117 | 118 |
119 void OnMetadata(int32 idb_database_id, | |
120 content::IndexedDBDatabaseMetadata* metadata); | |
118 void OnName(int32 idb_database_id, string16* name); | 121 void OnName(int32 idb_database_id, string16* name); |
119 void OnVersion(int32 idb_database_id, string16* version); | 122 void OnVersion(int32 idb_database_id, string16* version); |
120 void OnObjectStoreNames(int32 idb_database_id, | 123 void OnObjectStoreNames(int32 idb_database_id, |
121 std::vector<string16>* object_stores); | 124 std::vector<string16>* object_stores); |
michaeln
2012/06/08 19:46:51
once the uber OnMetadata() goes in, is the plan to
jsbell
2012/06/08 20:11:57
Yes!
| |
122 void OnCreateObjectStore( | 125 void OnCreateObjectStore( |
123 const IndexedDBHostMsg_DatabaseCreateObjectStore_Params& params, | 126 const IndexedDBHostMsg_DatabaseCreateObjectStore_Params& params, |
124 int32* object_store_id, WebKit::WebExceptionCode* ec); | 127 int32* object_store_id, WebKit::WebExceptionCode* ec); |
125 void OnDeleteObjectStore(int32 idb_database_id, | 128 void OnDeleteObjectStore(int32 idb_database_id, |
126 const string16& name, | 129 const string16& name, |
127 int32 transaction_id, | 130 int32 transaction_id, |
128 WebKit::WebExceptionCode* ec); | 131 WebKit::WebExceptionCode* ec); |
129 void OnSetVersion(int32 idb_database_id, | 132 void OnSetVersion(int32 idb_database_id, |
130 int32 thread_id, | 133 int32 thread_id, |
131 int32 response_id, | 134 int32 response_id, |
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
326 scoped_ptr<CursorDispatcherHost> cursor_dispatcher_host_; | 329 scoped_ptr<CursorDispatcherHost> cursor_dispatcher_host_; |
327 scoped_ptr<TransactionDispatcherHost> transaction_dispatcher_host_; | 330 scoped_ptr<TransactionDispatcherHost> transaction_dispatcher_host_; |
328 | 331 |
329 // Used to dispatch messages to the correct view host. | 332 // Used to dispatch messages to the correct view host. |
330 int process_id_; | 333 int process_id_; |
331 | 334 |
332 DISALLOW_IMPLICIT_CONSTRUCTORS(IndexedDBDispatcherHost); | 335 DISALLOW_IMPLICIT_CONSTRUCTORS(IndexedDBDispatcherHost); |
333 }; | 336 }; |
334 | 337 |
335 #endif // CONTENT_BROWSER_IN_PROCESS_WEBKIT_INDEXED_DB_DISPATCHER_HOST_H_ | 338 #endif // CONTENT_BROWSER_IN_PROCESS_WEBKIT_INDEXED_DB_DISPATCHER_HOST_H_ |
OLD | NEW |